SimpleDequePool is based on Deque for idle resources and pending Pool#acquire() Monos,
allowing both to be ordered either LIFO or FIFO.
It uses non-blocking drain loops to deliver resources to borrowers, which means that a resource could
be handed off on any of the following threads:
Pool#acquire() Mono was subscribedPoolBuilder#acquisitionScheduler(Scheduler) property of the builder can be used.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| pack-priv static class | |
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv volatile int | |
| private static final AtomicIntegerFieldUpdater | |
| pack-priv Disposable | |
| protected static final AtomicReferenceFieldUpdater | |
| private static final AtomicIntegerFieldUpdater | |
| pack-priv final boolean | |
| pack-priv volatile Deque | |
| pack-priv volatile int | |
| pack-priv volatile ConcurrentLinkedDeque | |
| private static final AtomicReferenceFieldUpdater | |
| private static final AtomicIntegerFieldUpdater | |
| pack-priv volatile int | |
| private static final ConcurrentLinkedDeque | |
| pack-priv volatile int | |
| private static final AtomicIntegerFieldUpdater |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Mono | acquire()
Implements reactor. POOLABLE from the pool upon subscription and become responsible for its release.
|
| public Mono | acquire(Duration timeout)
Implements reactor. POOLABLE from the pool upon subscription and become responsible for its release.
|
| public int | acquiredSize()
Overrides reactor. Implements reactor. acquired and are in active use, outside of the
control of the pool until they're released back to it.
|
| private Mono | |
| pack-priv void | cancelAcquire(AbstractPool.
Implements abstract reactor. |
| pack-priv SimpleDequePool. | |
| pack-priv void | |
| public Mono | disposeLater()
Implements reactor. Mono that represents a lazy asynchronous shutdown of this Pool.
|
| pack-priv void | doAcquire(AbstractPool.
Implements abstract reactor. Borrower countdown by calling
Borrower#stopPendingCountdown(boolean) as soon as it is known that a resource is
available or is in the process of being allocated.
|
| pack-priv void | |
| private void | |
| pack-priv boolean | |
| pack-priv void | |
| public int | idleSize()
Implements abstract reactor. Implements reactor. Pool.
|
| pack-priv void | |
| public boolean | isDisposed()
Overrides default reactor. |
| pack-priv final void | maybeRecycleAndDrain(SimpleDequePool.
|
| public int | pendingAcquireSize()
Implements reactor. acquire Monos in
the Pool.
|
| pack-priv void | pendingOffer(AbstractPool.
a new pendingreactor. to add to the queue and later either serve or consider pending
|
| pack-priv AbstractPool. | Returns: the nextreactor. to serve
|
| pack-priv SimpleDequePool. | |
| pack-priv void | |
| public Mono | |
| pack-priv Mono |