This class is intended to be used only as HTTP/2 connection pool. It doesn't have generic purpose.
The connection is removed from the pool when:
The connection is filtered out when:
This pool always invalidate the PooledRef, there is no release functionality.
PoolMetrics#acquiredSize(), PoolMetrics#allocatedSize() and PoolMetrics#idleSize()
always return the number of the cached connections.Http2Pool#activeStreams() always return the active streams from all connections currently in the pool.If minimum connections is specified, the cached connections with active streams will be kept at that minimum (can be the best effort). However, if the cached connections have reached max concurrent streams, then new connections will be allocated up to the maximum connections limit.
Configurations that are not applicable
PoolConfig#destroyHandler() - the destroy handler cannot be used as the destruction is more complex.PoolConfig#evictionPredicate() - the eviction predicate cannot be used as more complex
checks have to be done. Also the pool uses filtering for the connections (a connection might not be able
to be used but is required to stay in the pool).PoolConfig#metricsRecorder() - no pool instrumentation.PoolConfig#releaseHandler() - release functionality works as invalidate.PoolConfig#reuseIdleResourcesInLruOrder() - FIFO is used when checking the connections.This class is based on https://github.com/reactor/reactor-pool/blob/v0.2.7/src/main/java/reactor/pool/SimpleDequePool.java
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| pack-priv static class | |
| pack-priv static class | |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv volatile int | |
| pack-priv static final AtomicIntegerFieldUpdater | |
| pack-priv final Clock | |
| pack-priv volatile ConcurrentLinkedQueue | |
| pack-priv static final AtomicReferenceFieldUpdater | |
| pack-priv static final Function | |
| pack-priv Disposable | |
| private static final AtomicIntegerFieldUpdater | |
| pack-priv volatile int | |
| pack-priv long | |
| pack-priv static final Logger | |
| pack-priv final Long | |
| pack-priv final long | |
| pack-priv final long | |
| pack-priv final int | |
| pack-priv volatile ConcurrentLinkedDeque | pending
Pending borrowers queue. |
| pack-priv static final AtomicReferenceFieldUpdater | |
| private static final AtomicIntegerFieldUpdater | |
| pack-priv volatile int | |
| pack-priv final reactor.netty5.internal.shaded.reactor.pool.PoolConfig | |
| pack-priv static final ConcurrentLinkedDeque | |
| pack-priv static final AtomicLongFieldUpdater | |
| pack-priv volatile long | |
| pack-priv volatile int | |
| pack-priv static final AtomicIntegerFieldUpdater |
| Access | Constructor and Description |
|---|---|
| pack-priv | Http2Pool(reactor.netty5.internal.shaded.reactor.pool.PoolConfig<Connection> poolConfig, ConnectionProvider.
|
| Modifier and Type | Method and Description |
|---|---|
| public Mono | |
| public Mono | |
| public int | |
| pack-priv int | |
| pack-priv int | addPending(ConcurrentLinkedDeque<Http2Pool.
|
| public int | |
| pack-priv void | |
| public reactor.netty5.internal.shaded.reactor.pool.PoolConfig | |
| pack-priv Mono | |
| public Mono | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv Http2Pool. | |
| public int | |
| public int | |
| public int | |
| public boolean | |
| public boolean | |
| pack-priv boolean | |
| pack-priv boolean | |
| public reactor. | |
| pack-priv void | |
| pack-priv void | |
| public int | |
| pack-priv void | pendingOffer(Http2Pool.
a new borrowerBorrower to add to the queue and later either serve or consider pending
|
| pack-priv Http2Pool. | |
| pack-priv Http2Pool. | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| public long | |
| public Mono |