PoolUtils.checkMinIdle
- TimerTask checkMinIdle(ObjectPool!(T) pool, int minIdle, long period)
class PoolUtils
static
TimerTask
checkMinIdle
- TimerTask checkMinIdle(KeyedObjectPool!(K, V) keyedPool, K key, int minIdle, long period)
- Map!(K, TimerTask) checkMinIdle(KeyedObjectPool!(K, V) keyedPool, Collection!(K) keys, int minIdle, long period)
hunt pool PoolUtils PoolUtils
constructorsstatic functions
Periodically check the idle object count for the pool. At most one idle object will be added per period. If there is an exception when calling {@link ObjectPool#addObject()} then no more checks will be performed.
@param pool the pool to check periodically. @param minIdle if the {@link ObjectPool#getNumIdle()} is less than this then add an idle object. @param period the frequency to check the number of idle objects in a pool, see {@link Timer#schedule(TimerTask, long, long)}. @param <T> the type of objects in the pool @return the {@link TimerTask} that will periodically check the pools idle object count. @throws IllegalArgumentException when <code>pool</code> is <code>null</code> or when <code>minIdle</code> is negative or when <code>period</code> isn't valid for {@link Timer#schedule(TimerTask, long, long)}