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:
java.lang.Runnable
- Enclosing class:
- PoolUtils
private static class PoolUtils.ObjectPoolMinIdleTimerTask<T> extends java.util.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 Summary
Fields Modifier and Type Field Description private int
minIdle
Minimum number of idle instances.private ObjectPool<T>
pool
Object pool
-
Constructor Summary
Constructors Constructor Description ObjectPoolMinIdleTimerTask(ObjectPool<T> pool, int minIdle)
Create a new ObjectPoolMinIdleTimerTask for the given pool with the given minIdle setting.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
run()
java.lang.String
toString()
-
-
-
Field Detail
-
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 Detail
-
ObjectPoolMinIdleTimerTask
ObjectPoolMinIdleTimerTask(ObjectPool<T> pool, int minIdle) throws java.lang.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:
java.lang.IllegalArgumentException
- if the pool is null
-
-