Class PoolUtils.KeyedObjectPoolMinIdleTimerTask<K,V>
java.lang.Object
java.util.TimerTask
org.datanucleus.store.rdbms.datasource.dbcp2.pool2.PoolUtils.KeyedObjectPoolMinIdleTimerTask<K,V>
- Type Parameters:
K
- object pool key typeV
- object pool value type
- 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) Creates 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 IllegalArgumentExceptionCreates 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