All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ldaptive.pool.PruneStrategy Maven / Gradle / Ivy

There is a newer version: 2.4.0
Show newest version
/* See LICENSE for licensing and NOTICE for copyright. */
package org.ldaptive.pool;

/**
 * Provides an interface for pruning connections from the pool.
 *
 * @author  Middleware Services
 */
public interface PruneStrategy
{


  /**
   * Invoked to determine whether a connection should be pruned from the pool.
   *
   * @param  conn  that is available for pruning
   *
   * @return  whether the connection should be pruned
   */
  boolean prune(PooledConnectionProxy conn);


  /**
   * Returns the number of statistics to store for this prune strategy. See {@link PooledConnectionStatistics}.
   *
   * @return  number of statistics to store
   */
  int getStatisticsSize();


  /**
   * Returns the interval at which the prune task will be executed in seconds.
   *
   * @return  prune period in seconds
   */
  long getPrunePeriod();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy