Class AbstractPruneStrategy

    • Field Detail

      • logger

        protected final Logger logger
        Logger for this class.
      • prunePeriod

        private Duration prunePeriod
        Prune period.
    • Constructor Detail

      • AbstractPruneStrategy

        public AbstractPruneStrategy()
    • Method Detail

      • getPrunePeriod

        public Duration getPrunePeriod()
        Description copied from interface: PruneStrategy
        Returns the interval at which the prune task will be executed.
        Specified by:
        getPrunePeriod in interface PruneStrategy
        Returns:
        prune period
      • setPrunePeriod

        public void setPrunePeriod​(Duration period)
        Sets the prune period.
        Parameters:
        period - to set
      • getPruneConditions

        protected abstract List<Predicate<PooledConnectionProxy>> getPruneConditions()
        Returns the predicates used by this prune strategy. Each predicate will be invoked for every connection to be pruned.
        Returns:
        List of predicates that are evaluated in order. Connections are removed from the pool immediately upon predicate returning true; subsequent predicates operate on a reduced pool.