Pool.
For a default implementation that is open for extension, see DefaultPoolConfig.
| Modifier and Type | Method and Description |
|---|---|
| public Scheduler | acquisitionScheduler()
When set, |
| public AllocationStrategy | allocationStrategy()
|
| public Mono | |
| public Clock | clock()
The |
| public Function | destroyHandler()
Defines a mechanism of resource destruction, cleaning up state and OS resources it could maintain (eg. |
| public default Duration | evictInBackgroundInterval()
If the pool is configured to perform regular eviction checks on the background, returns the |
| public default Scheduler | evictInBackgroundScheduler()
If the pool is configured to perform regular eviction checks on the background, returns the |
| public BiPredicate | evictionPredicate()
A |
| public int | |
| public PoolMetricsRecorder | metricsRecorder()
The |
| public default BiFunction | Returns: the function to apply when scheduling timers for pending acquisitionsThe function that defines how timeouts are scheduled when a |
| public Function | releaseHandler()
When a resource is |
| public boolean | Returns: true for LRU, false for MRUThe order in which idle (aka available) resources should be used when the pool was
under-utilized and a new |
| acquisitionScheduler | back to summary |
|---|---|
| public Scheduler acquisitionScheduler() When set,
Defaults to | |
| allocationStrategy | back to summary |
|---|---|
| public AllocationStrategy allocationStrategy()
| |
| allocator | back to summary |
|---|---|
| public Mono The asynchronous factory that produces new resources, represented as a | |
| clock | back to summary |
|---|---|
| public Clock clock() The | |
| destroyHandler | back to summary |
|---|---|
| public Function Defines a mechanism of resource destruction, cleaning up state and OS resources it could maintain (eg. off-heap objects, file handles, socket connections, etc...). For example, a database connection could need to cleanly sever the connection link by sending a message to the database. | |
| evictInBackgroundInterval | back to summary |
|---|---|
| public default Duration evictInBackgroundInterval() If the pool is configured to perform regular eviction checks on the background, returns the | |
| evictInBackgroundScheduler | back to summary |
|---|---|
| public default Scheduler evictInBackgroundScheduler() If the pool is configured to perform regular eviction checks on the background, returns the | |
| evictionPredicate | back to summary |
|---|---|
| public BiPredicate A | |
| maxPending | back to summary |
|---|---|
| public int maxPending() The maximum number of pending borrowers to enqueue before failing fast. 0 will immediately fail any acquire when no idle resource is available and the pool cannot grow. Use a negative number to deactivate. | |
| metricsRecorder | back to summary |
|---|---|
| public PoolMetricsRecorder metricsRecorder() The | |
| pendingAcquireTimer | back to summary |
|---|---|
| public default BiFunction The function that defines how timeouts are scheduled when a
By default, the
| |
| releaseHandler | back to summary |
|---|---|
| public Function When a resource is For example, a buffer could have a readerIndex and writerIndex that need to be flipped back to zero. | |
| reuseIdleResourcesInLruOrder | back to summary |
|---|---|
| public boolean reuseIdleResourcesInLruOrder() The order in which idle (aka available) resources should be used when the pool was
under-utilized and a new
| |