Class PoolUtils.KeyedObjectPoolMinIdleTimerTask<K,V>

java.lang.Object
java.util.TimerTask
org.apache.commons.pool.PoolUtils.KeyedObjectPoolMinIdleTimerTask<K,V>
All Implemented Interfaces:
Runnable
Enclosing class:
PoolUtils

private static class PoolUtils.KeyedObjectPoolMinIdleTimerTask<K,V> extends TimerTask
Timer task that adds objects to the pool until the number of idle instances for the given key reaches the configured minIdle. Note that this is not the same as the pool's minIdle setting.
  • Field Details

    • minIdle

      private final int minIdle
      Minimum number of idle instances. Not the same as pool.getMinIdle().
    • key

      private final K key
      Key to ensure minIdle for
    • keyedPool

      private final KeyedObjectPool<K,V> keyedPool
      Keyed object pool
  • Constructor Details

    • KeyedObjectPoolMinIdleTimerTask

      KeyedObjectPoolMinIdleTimerTask(KeyedObjectPool<K,V> keyedPool, K key, int minIdle) throws IllegalArgumentException
      Create a new KeyedObjecPoolMinIdleTimerTask.
      Parameters:
      keyedPool - keyed object pool
      key - key to ensure minimum number of idle instances
      minIdle - minimum number of idle instances
      Throws:
      IllegalArgumentException - if the key is null
  • Method Details