Package org.apache.commons.pool
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
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionKeyedObjectPoolMinIdleTimerTask
(KeyedObjectPool<K, V> keyedPool, K key, int minIdle) Create a new KeyedObjecPoolMinIdleTimerTask. -
Method Summary
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
-
Field Details
-
minIdle
private final int minIdleMinimum number of idle instances. Not the same as pool.getMinIdle(). -
key
Key to ensure minIdle for -
keyedPool
Keyed object pool
-
-
Constructor Details
-
KeyedObjectPoolMinIdleTimerTask
KeyedObjectPoolMinIdleTimerTask(KeyedObjectPool<K, V> keyedPool, K key, int minIdle) throws IllegalArgumentExceptionCreate a new KeyedObjecPoolMinIdleTimerTask.- Parameters:
keyedPool
- keyed object poolkey
- key to ensure minimum number of idle instancesminIdle
- minimum number of idle instances- Throws:
IllegalArgumentException
- if the key is null
-
-
Method Details