private void awaitAvailableConnection(long timeout, TimeUnit unit) throws InterruptedException {
        logger.debug("Wait {} {} for an available connection on {} with {}", timeout, unit, host, Thread.currentThread());
        logConnectionPoolStatus();

        waiter.incrementAndGet();
        try {
            hasAvailableConnection.await(timeout, unit);
        } finally {
            waiter.decrementAndGet();
        }
    }
Get an available connection from the pool. Also triggers consideration of a new connection if the least-used
connection has hit the usage maximum or no valid connection could be retrieved from the pool.

@return an available connection from the pool. Returns null if no valid connection could be retrieved from the
pool.
gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ConnectionPool.java