@Nullable
    private PooledChannel acquireNowExact(PoolKey key, SessionProtocol protocol,
                                          SerializationFormat serializationFormat) {
        if (serializationFormat.requiresNewConnection(protocol)) {
            return null;
        }
        final Deque<PooledChannel> queue = getPool(protocol, key);
        if (queue == null) {
            return null;
        }

        // Find the most recently released channel while cleaning up the unhealthy channels.
        for (int i = queue.size(); i > 0; i--) {
            final PooledChannel pooledChannel = queue.peekLast();
            assert pooledChannel != null;
            if (!isHealthy(pooledChannel)) {
                queue.removeLast();
                continue;
            }

            final HttpSession session = HttpSession.get(pooledChannel.get());
            if (!session.incrementNumUnfinishedResponses()) {
                // The channel is full of streams so we cannot create a new one.
                // Move the channel to the beginning of the queue so it has low priority.
                queue.removeLast();
                queue.addFirst(pooledChannel);
                continue;
            }

            if (!protocol.isMultiplex()) {
                queue.removeLast();
            }
            return pooledChannel;
        }

        return null;
    }
Attempts to acquire a {@link Channel} which is matched by the specified condition immediately.

@return {@code null} is there's no match left in the pool and thus a new connection has to be
        requested via {@link #acquireLater(SessionProtocol, SerializationFormat,
        PoolKey, ClientConnectionTimingsBuilder)}.
core/src/main/java/com/linecorp/armeria/client/HttpChannelPool.java