Package org.apache.commons.pool
Class PoolUtils.ObjectPoolMinIdleTimerTask<T>
java.lang.Object
java.util.TimerTask
org.apache.commons.pool.PoolUtils.ObjectPoolMinIdleTimerTask<T>
- All Implemented Interfaces:
Runnable
- Enclosing class:
PoolUtils
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 Summary
FieldsModifier and TypeFieldDescriptionprivate final int
Minimum number of idle instances.private final ObjectPool
<T> Object pool -
Constructor Summary
ConstructorsConstructorDescriptionObjectPoolMinIdleTimerTask
(ObjectPool<T> pool, int minIdle) Create a new ObjectPoolMinIdleTimerTask for the given pool with the given minIdle setting. -
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(). -
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 poolminIdle
- number of idle instances to maintain- Throws:
IllegalArgumentException
- if the pool is null
-
-
Method Details