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:
java.lang.Runnable
- Enclosing class:
- PoolUtils
private static final class PoolUtils.KeyedObjectPoolMinIdleTimerTask<K,V> extends java.util.TimerTask
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.
-
-
Constructor Summary
Constructors Constructor Description KeyedObjectPoolMinIdleTimerTask(KeyedObjectPool<K,V> keyedPool, K key, int minIdle)
Creates a new KeyedObjecPoolMinIdleTimerTask.
-
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().
-
key
private final K key
Key to ensure minIdle for
-
keyedPool
private final KeyedObjectPool<K,V> keyedPool
Keyed object pool
-
-
Constructor Detail
-
KeyedObjectPoolMinIdleTimerTask
KeyedObjectPoolMinIdleTimerTask(KeyedObjectPool<K,V> keyedPool, K key, int minIdle) throws java.lang.IllegalArgumentException
Creates a new KeyedObjecPoolMinIdleTimerTask.- Parameters:
keyedPool
- keyed object poolkey
- key to ensure minimum number of idle instancesminIdle
- minimum number of idle instances- Throws:
java.lang.IllegalArgumentException
- if the key is null
-
-