PoolEntry<T, C> lease() {
            lock.lock();
            try {
                final PoolEntry<T, C> entry = entryMap.entrySet().stream()
                        .min(Comparator.comparingLong(e -> e.getValue().get()))
                        .map(Map.Entry::getKey)
                        .orElse(null);
                if (entry == null) {
                    return null;
                }
                final AtomicLong counter = getCounter(entry);
                counter.incrementAndGet();
                return entry;
            } finally {
                lock.unlock();
            }
        }
Experimental connections pool implementation that acts as a caching facade in front of
a standard {@link ManagedConnPool} and shares already leased connections to multiplex
message exchanges over active HTTP/2 connections.
@param <T> route
@param <C> connection object

@since 5.5
httpclient5/src/main/java/org/apache/hc/client5/http/impl/nio/H2SharingConnPool.java