Package org.apache.commons.pool.impl.GenericKeyedObjectPool

Examples of org.apache.commons.pool.impl.GenericKeyedObjectPool.Config


 
  @Test
  public void testPoolExpiration() throws Exception {
    // Makes sure that a thrift client gets evicted (and therefore closed) if it is not
    // used for a certain amount of time.
    Config conf = ThriftClientPool.getPoolConfig();
   
    // We decrease the defaults here so the test runs in reasonable time
    conf.minEvictableIdleTimeMillis = 10;
    conf.timeBetweenEvictionRunsMillis = 50;
   
View Full Code Here


  private static final Logger LOG = Logger.getLogger(ThriftClientPool.class);

  /** Get the configuration parameters used on the underlying client pool. */
  protected static Config getPoolConfig() {
    Config conf = new Config();
    conf.minIdle = MIN_IDLE_CLIENTS_PER_ADDR;
    conf.maxIdle = -1;
    conf.minEvictableIdleTimeMillis = EVICTABLE_IDLE_TIME_MILLIS;
    conf.timeBetweenEvictionRunsMillis = TIME_BETWEEN_EVICTION_RUNS_MILLIS;
    conf.maxActive = MAX_ACTIVE_CLIENTS_PER_ADDR;
View Full Code Here

TOP

Related Classes of org.apache.commons.pool.impl.GenericKeyedObjectPool.Config

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.