Pool
PoolConfig flavor this builder will provide to the created Pool
| Modifier and Type | Field and Description |
|---|---|
| pack-priv Scheduler | |
| pack-priv AllocationStrategy | |
| pack-priv final Mono | |
| pack-priv Clock | |
| pack-priv final Function | |
| pack-priv static final BiFunction | |
| pack-priv static final int | |
| pack-priv Function | |
| pack-priv Duration | |
| pack-priv Scheduler | |
| pack-priv BiPredicate | |
| pack-priv boolean | |
| pack-priv int | |
| pack-priv PoolMetricsRecorder | |
| pack-priv static final BiPredicate | |
| pack-priv static final Function | |
| pack-priv BiFunction | |
| pack-priv Function |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public PoolBuilder | |
| public PoolBuilder | Returns: thisPool builderthe allocationStrategy)AllocationStrategy to useLimits in how many resources can be allocated and managed by the |
| public <POOL extends Pool | |
| pack-priv CONF | |
| public InstrumentedPool | Returns: anInstrumentedPoolConstruct a default reactor pool with the builder's configuration. |
| public < the type of decorated pool, must extend P extends InstrumentedPoolInstrumentedPool (with same type of resource) | Returns: the built-then-decorated poola decorator decorator)Function returning a decorated version of the InstrumentedPoolConstruct a default reactor pool with the builder's configuration, then wrap it
into a decorator implementation using the provided |
| public PoolBuilder | |
| public PoolBuilder | |
| public PoolBuilder | Returns: thisPool builderEnable background eviction so that |
| public PoolBuilder | Returns: thisPool builderEnable background eviction so that |
| public PoolBuilder | Returns: thisPool builderDisable background eviction entirely, so that |
| public PoolBuilder | Returns: thisPool builderthe maxIdleTime)Duration after which an object should not be passed to a borrower, but destroyed (resolution: ms)Set the |
| public PoolBuilder | Returns: thisPool buildera evictionPredicate)Predicate that returns true if the resource is unfit for the pool and should
be destroyed, false if it should be put back into the poolProvide an eviction |
| public < new type for the configuration CONF2 extends PoolConfig | Returns: a new PoolBuilder that now produces a different type ofPoolConfigFunction to transform the type of PoolConfig
created by this builder for the benefit of the pool factory, allowing for custom
implementations with custom configurationsAdd implementation-specific configuration, changing the type of |
| public static < the type of resource created and recycled by the T> PoolBuilderPool | |
| pack-priv static <T> BiPredicate | |
| public PoolBuilder | Returns: thisPool builderConfigure the pool so that if there are idle resources (ie pool is under-utilized),
the next |
| public PoolBuilder | Returns: thisPool builderConfigure the pool so that if there are idle resources (ie pool is under-utilized),
the next |
| public PoolBuilder | Returns: thisPool buildertrue for LRU (the default) or false for MRUConfigure the order in which idle resources are used when the next |
| public PoolBuilder | Returns: a builder ofPool with a maximum pending queue size.the maximum number of registered acquire monos to keep in a pending queue maxPending)Set the maximum number of subscribed |
| public PoolBuilder | Returns: a builder ofPool with no maximum pending queue sizeUncap the number of subscribed |
| public PoolBuilder | Returns: thisPool builderSet up the optional |
| pack-priv static <T> BiPredicate | |
| pack-priv static <T> Function | |
| public PoolBuilder | Returns: thisPool builderthe function to apply when scheduling timers for acquisitions that are added to the pending queue. pendingAcquireTimer)Define how timeouts are scheduled when a |
| public PoolBuilder | |
| public PoolBuilder | Returns: thisPool builderthe minimum number of live resources to keep in the pool (can be best effort) min, int the maximum number of live resources to keep in the pool. use max)Integer#MAX_VALUE when you only need a
minimum and no upper boundReplace the |
| public PoolBuilder | Returns: thisPool builderthe minimum number of live resources to keep in the pool (can be best effort) min, int the maximum number of live resources to keep in the pool. use max, int Integer#MAX_VALUE when you only need a
minimum and no upper boundSpecifies the concurrency level used when the allocator is subscribed to during the warmup phase, if any.
During warmup, resources that can be pre-allocated will be created eagerly, but at most warmupParallelism)warmupParallelism resources are
subscribed to at the same time.
A warmupParallelism of 1 means that pre-allocation of resources is achieved by sequentially subscribing to the allocator,
waiting for a resource to be created before subscribing a next time to the allocator, and so on until the last allocation
completes.Replace the |
| public PoolBuilder | Returns: thisPool builderReplace the |
| acquisitionScheduler | back to summary |
|---|---|
| pack-priv Scheduler acquisitionScheduler | |
| allocationStrategy | back to summary |
|---|---|
| pack-priv AllocationStrategy allocationStrategy | |
| allocator | back to summary |
|---|---|
| pack-priv final Mono<T> allocator | |
| clock | back to summary |
|---|---|
| pack-priv Clock clock | |
| configModifier | back to summary |
|---|---|
| pack-priv final Function<PoolConfig<T>, CONF> configModifier | |
| DEFAULT_PENDING_ACQUIRE_TIMER | back to summary |
|---|---|
| pack-priv static final BiFunction<Runnable, Duration, Disposable> DEFAULT_PENDING_ACQUIRE_TIMER | |
| DEFAULT_WARMUP_PARALLELISM | back to summary |
|---|---|
| pack-priv static final int DEFAULT_WARMUP_PARALLELISM | |
| destroyHandler | back to summary |
|---|---|
| pack-priv Function<T, ? extends Publisher<Void>> destroyHandler | |
| evictionBackgroundInterval | back to summary |
|---|---|
| pack-priv Duration evictionBackgroundInterval | |
| evictionBackgroundScheduler | back to summary |
|---|---|
| pack-priv Scheduler evictionBackgroundScheduler | |
| evictionPredicate | back to summary |
|---|---|
| pack-priv BiPredicate<T, PooledRefMetadata> evictionPredicate | |
| idleLruOrder | back to summary |
|---|---|
| pack-priv boolean idleLruOrder | |
| maxPending | back to summary |
|---|---|
| pack-priv int maxPending | |
| metricsRecorder | back to summary |
|---|---|
| pack-priv PoolMetricsRecorder metricsRecorder | |
| NEVER_PREDICATE | back to summary |
|---|---|
| pack-priv static final BiPredicate<?, ?> NEVER_PREDICATE | |
| NOOP_HANDLER | back to summary |
|---|---|
| pack-priv static final Function<?, Mono<Void>> NOOP_HANDLER | |
| pendingAcquireTimer | back to summary |
|---|---|
| pack-priv BiFunction<Runnable, Duration, Disposable> pendingAcquireTimer | |
| releaseHandler | back to summary |
|---|---|
| pack-priv Function<T, ? extends Publisher<Void>> releaseHandler | |
| PoolBuilder | back to summary |
|---|---|
| pack-priv PoolBuilder(Mono<T> allocator, Function<PoolConfig<T>, CONF> configModifier) | |
| PoolBuilder | back to summary |
|---|---|
| pack-priv PoolBuilder(PoolBuilder<T, ?> source, Function<PoolConfig<T>, CONF> configModifier) | |
| acquisitionScheduler | back to summary |
|---|---|
| public PoolBuilder Provide a
Defaults to
| |
| allocationStrategy | back to summary |
|---|---|
| public PoolBuilder Limits in how many resources can be allocated and managed by the
Without a call to any of these 3 methods, the builder defaults to an
| |
| build | back to summary |
|---|---|
| public <POOL extends Pool Build a custom flavor of | |
| buildConfig | back to summary |
|---|---|
| pack-priv CONF buildConfig() | |
| buildPool | back to summary |
|---|---|
| public InstrumentedPool Construct a default reactor pool with the builder's configuration.
| |
| buildPoolAndDecorateWith | back to summary |
|---|---|
| public <P extends InstrumentedPool Construct a default reactor pool with the builder's configuration, then wrap it
into a decorator implementation using the provided
| |
| clock | back to summary |
|---|---|
| public PoolBuilder Set the
These durations can also be exported as metrics, through the
| |
| destroyHandler | back to summary |
|---|---|
| public PoolBuilder Provide a
Defaults to recognizing | |
| evictInBackground | back to summary |
|---|---|
| public PoolBuilder Enable background eviction so that
Providing an Background eviction support is optional: although all vanilla reactor-pool implementations DO support it, other implementations MAY ignore it. The background eviction process can be implemented in a best effort fashion, backing off if it detects any pool activity.
| |
| evictInBackground | back to summary |
|---|---|
| public PoolBuilder Enable background eviction so that
Providing an Background eviction support is optional: although all vanilla reactor-pool implementations DO support it, other implementations MAY ignore it. The background eviction process can be implemented in a best effort fashion, backing off if it detects any pool activity.
| |
| evictInBackgroundDisabled | back to summary |
|---|---|
| public PoolBuilder Disable background eviction entirely, so that
| |
| evictionIdle | back to summary |
|---|---|
| public PoolBuilder Set the
This replaces any
| |
| evictionPredicate | back to summary |
|---|---|
| public PoolBuilder Provide an eviction
Defaults to never evicting (a
In case some asynchronous verification of the health of a resource is needed, one possible approach is
to rely on
| |
| extraConfiguration | back to summary |
|---|---|
| public <CONF2 extends PoolConfig Add implementation-specific configuration, changing the type of
| |
| from | back to summary |
|---|---|
| public static <T> PoolBuilder Start building a
Adapting from blocking code is only acceptable if ensuring the work is offset on another
| |
| idlePredicate | back to summary |
|---|---|
| pack-priv static <T> BiPredicate | |
| idleResourceReuseLruOrder | back to summary |
|---|---|
| public PoolBuilder Configure the pool so that if there are idle resources (ie pool is under-utilized),
the next
| |
| idleResourceReuseMruOrder | back to summary |
|---|---|
| public PoolBuilder Configure the pool so that if there are idle resources (ie pool is under-utilized),
the next
| |
| idleResourceReuseOrder | back to summary |
|---|---|
| public PoolBuilder Configure the order in which idle resources are used when the next
| |
| maxPendingAcquire | back to summary |
|---|---|
| public PoolBuilder Set the maximum number of subscribed Default to -1.
| |
| maxPendingAcquireUnbounded | back to summary |
|---|---|
| public PoolBuilder Uncap the number of subscribed This is the default.
| |
| metricsRecorder | back to summary |
|---|---|
| public PoolBuilder Set up the optional
| |
| neverPredicate | back to summary |
|---|---|
pack-priv static <T> BiPredicate
| |
| noopHandler | back to summary |
|---|---|
pack-priv static <T> Function
| |
| pendingAcquireTimer | back to summary |
|---|---|
| public PoolBuilder Define how timeouts are scheduled when a
By default, the
| |
| releaseHandler | back to summary |
|---|---|
| public PoolBuilder Provide a Defaults to not resetting anything. | |
| sizeBetween | back to summary |
|---|---|
| public PoolBuilder Replace the Pre-allocation of warmed-up resources, if any, will be performed sequentially by subscribing to the allocator one at a time. The process waits for a resource to be created before subscribing again to the allocator. This sequence continues until all pre-allocated resources have been successfully created.
| |
| sizeBetween | back to summary |
|---|---|
| public PoolBuilder Replace the
| |
| sizeUnbounded | back to summary |
|---|---|
| public PoolBuilder Replace the
Note this is the default, if no previous call to
| |