Package org.ldaptive.pool
Interface PruneStrategy
-
- All Superinterfaces:
Consumer<Supplier<Iterator<PooledConnectionProxy>>>
- All Known Implementing Classes:
AbstractPruneStrategy
,AgePruneStrategy
,IdlePruneStrategy
public interface PruneStrategy extends Consumer<Supplier<Iterator<PooledConnectionProxy>>>
Provides an interface for pruning connections from the pool. The list of predicates provided by the strategy are used against the entire pool in order. So that connections pruned by the first predicate are no longer available when the second predicate is used. In this fashion, a prune strategy can order any number of predicates, each of which can inspect the pool and make a determination whether to prune a connection.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Duration
getPrunePeriod()
Returns the interval at which the prune task will be executed.int
getStatisticsSize()
Returns the number of statistics to store for this prune strategy.
-
-
-
Method Detail
-
getStatisticsSize
int getStatisticsSize()
Returns the number of statistics to store for this prune strategy. SeePooledConnectionStatistics
.- Returns:
- number of statistics to store
-
getPrunePeriod
Duration getPrunePeriod()
Returns the interval at which the prune task will be executed.- Returns:
- prune period
-
-