Class PoolUtils.ObjectPoolMinIdleTimerTask<T>

java.lang.Object
java.util.TimerTask
org.apache.commons.pool.PoolUtils.ObjectPoolMinIdleTimerTask<T>
All Implemented Interfaces:
Runnable
Enclosing class:
PoolUtils

private static class PoolUtils.ObjectPoolMinIdleTimerTask<T> extends TimerTask
Timer task that adds objects to the pool until the number of idle instances 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().
    • pool

      private final ObjectPool<T> pool
      Object pool
  • Constructor Details

    • ObjectPoolMinIdleTimerTask

      ObjectPoolMinIdleTimerTask(ObjectPool<T> pool, int minIdle) throws IllegalArgumentException
      Create a new ObjectPoolMinIdleTimerTask for the given pool with the given minIdle setting.
      Parameters:
      pool - object pool
      minIdle - number of idle instances to maintain
      Throws:
      IllegalArgumentException - if the pool is null
  • Method Details