| Modifier and Type | Class and Description |
|---|---|
| private static class | PoolUtils.ErodingFactor
Encapsulate the logic for when the next poolable object should be discarded. |
| private static class | PoolUtils.ErodingKeyedObjectPool<
object pool key type K, object pool value type V>Decorates a keyed object pool, adding "eroding" behavior. |
| private static class | PoolUtils.ErodingObjectPool<
type of objects in the pool T>Decorates an object pool, adding "eroding" behavior. |
| private static class | PoolUtils.ErodingPerKeyKeyedObjectPool<
object pool key type K, object pool value type V>Extends ErodingKeyedObjectPool to allow erosion to take place on a per-key basis. |
| private static class | PoolUtils.KeyedObjectPoolMinIdleTimerTask<
object pool key type K, object pool value type V>Timer task that adds objects to the pool until the number of idle instances for the given key reaches the configured minIdle. |
| private static class | PoolUtils.ObjectPoolMinIdleTimerTask<
type of objects in the pool T>Timer task that adds objects to the pool until the number of idle instances reaches the configured minIdle. |
| pack-priv static class | PoolUtils.SynchronizedKeyedObjectPool<
object pool key type K, object pool value type V>A synchronized (thread-safe) KeyedObjectPool backed by the specified KeyedObjectPool. |
| private static class | PoolUtils.SynchronizedKeyedPooledObjectFactory<
pooled object factory key type K, pooled object factory value type V>A fully synchronized KeyedPooledObjectFactory that wraps a KeyedPooledObjectFactory and synchronizes access to the wrapped factory methods. |
| private static class | PoolUtils.SynchronizedObjectPool<
type of objects in the pool T>A synchronized (thread-safe) ObjectPool backed by the specified ObjectPool. |
| private static class | PoolUtils.SynchronizedPooledObjectFactory<
pooled object factory type T>A fully synchronized PooledObjectFactory that wraps a PooledObjectFactory and synchronizes access to the wrapped factory methods. |
| pack-priv static class | PoolUtils.TimerHolder
Timer used to periodically check pools idle object count. |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final String | |
| pack-priv static final String | |
| private static final String | |
| pack-priv static final String | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static < the type of the pool key K, the type of pool entries V> Map | checkMinIdle(final KeyedObjectPool<K, V>
the keyedPool to check periodically. keyedPool, final Collection<K> a collection of keys to check the idle object count. keys, final int if the minIdle, final long KeyedObjectPool#getNumIdle(Object) is less than
this then add an idle object.the frequency in milliseconds to check the number of idle objects in a
keyedPool, see periodMillis)Timer#schedule(TimerTask, long, long).Periodically check the idle object count for each key in the
|
| public static < the type of the pool key K, the type of pool entries V> TimerTask | Returns: theTimerTask that will periodically check the pools idle
object count.the keyedPool to check periodically. keyedPool, final K the key to check the idle count of. key, final int if the minIdle, final long KeyedObjectPool#getNumIdle(Object) is less than
this then add an idle object.the frequency in milliseconds to check the number of idle objects in a
keyedPool, see periodMillis)Timer#schedule(TimerTask, long, long).Periodically check the idle object count for the key in the keyedPool. |
| public static < the type of objects in the pool T> TimerTask | Returns: theTimerTask that will periodically check the pools idle
object count.the pool to check periodically. pool, final int if the minIdle, final long ObjectPool#getNumIdle() is less than this then
add an idle object.the frequency in milliseconds to check the number of idle objects in a pool,
see periodMillis)Timer#schedule(TimerTask, long, long).Periodically check the idle object count for the pool. |
| public static void | checkRethrow(final Throwable
The Throwable to check t)Should the supplied Throwable be re-thrown (eg if it is an instance of one of the Throwables that should never be swallowed). |
| public static < the type of the pool key K, the type of pool entries V> KeyedObjectPool | Returns: a pool that adaptively decreases its size when idle objects are no longer needed.the KeyedObjectPool to be decorated so it shrinks its idle
count when possible. keyedPool)Returns a pool that adaptively decreases its size when idle objects are no longer needed. |
| public static < the type of the pool key K, the type of pool entries V> KeyedObjectPool | Returns: a pool that adaptively decreases its size when idle objects are no longer needed.the KeyedObjectPool to be decorated so it shrinks its idle
count when possible. keyedPool, final float a positive value to scale the rate at which the pool tries to
reduce its size. If 0 < factor < 1 then the pool
shrinks more aggressively. If 1 < factor then the pool
shrinks less aggressively. factor)Returns a pool that adaptively decreases its size when idle objects are no longer needed. |
| public static < the type of the pool key K, the type of pool entries V> KeyedObjectPool | Returns: a pool that adaptively decreases its size when idle objects are no longer needed.the KeyedObjectPool to be decorated so it shrinks its idle
count when possible. keyedPool, final float a positive value to scale the rate at which the pool tries to
reduce its size. If 0 < factor < 1 then the pool
shrinks more aggressively. If 1 < factor then the pool
shrinks less aggressively. factor, final boolean when true, each key is treated independently. perKey)Returns a pool that adaptively decreases its size when idle objects are no longer needed. |
| public static < the type of objects in the pool T> ObjectPool | Returns: a pool that adaptively decreases its size when idle objects are no longer needed.the ObjectPool to be decorated so it shrinks its idle count
when possible. pool)Returns a pool that adaptively decreases its size when idle objects are no longer needed. |
| public static < the type of objects in the pool T> ObjectPool | Returns: a pool that adaptively decreases its size when idle objects are no longer needed.the ObjectPool to be decorated so it shrinks its idle count
when possible. pool, final float a positive value to scale the rate at which the pool tries to
reduce its size. If 0 < factor < 1 then the pool
shrinks more aggressively. If 1 < factor then the pool
shrinks less aggressively. factor)Returns a pool that adaptively decreases its size when idle objects are no longer needed. |
| private static Timer | Returns: theTimer for checking keyedPool's idle count.Gets the |
| public static < the type of the pool key K, the type of pool entries V> void | prefill(final KeyedObjectPool<K, V>
the keyedPool to prefill. keyedPool, final Collection<K> Collection of keys to add objects for.the number of idle objects to add for each count)key.
Deprecated
Use
Calls KeyedObjectPool#addObjects(Collection, int).
KeyedObjectPool#addObject(Object) on keyedPool with
each key in keys for count number of times.
|
| public static < the type of the pool key K, the type of pool entries V> void | prefill(final KeyedObjectPool<K, V>
the keyedPool to prefill. keyedPool, final K the key to add objects for. key, final int the number of idle objects to add for count)key.
Deprecated
Use
Calls KeyedObjectPool#addObjects(Object, int).
KeyedObjectPool#addObject(Object) on keyedPool with
key count number of times.
|
| public static < the type of objects in the pool T> void | prefill(final ObjectPool<T>
the pool to prefill. pool, final int the number of idle objects to add. count)
Deprecated
Use
Calls ObjectPool#addObjects(int).
ObjectPool#addObject() on pool count number
of times.
|
| public static < the type of the pool key K, the type of pool entries V> KeyedPooledObjectFactory | Returns: a synchronized view of the specified KeyedPooledObjectFactory.the KeyedPooledObjectFactory to be "wrapped" in a
synchronized KeyedPooledObjectFactory. keyedFactory)Returns a synchronized (thread-safe) KeyedPooledObjectFactory backed by the specified KeyedPooledObjectFactory. |
| public static < the type of the pool key K, the type of pool entries V> KeyedObjectPool | Returns: a synchronized view of the specified KeyedObjectPool.the KeyedObjectPool to be "wrapped" in a synchronized
KeyedObjectPool. keyedPool)Returns a synchronized (thread-safe) KeyedObjectPool backed by the specified KeyedObjectPool. |
| public static < the type of objects in the pool T> ObjectPool | Returns: a synchronized view of the specified ObjectPool.the ObjectPool to be "wrapped" in a synchronized ObjectPool. pool)Returns a synchronized (thread-safe) ObjectPool backed by the specified ObjectPool. |
| public static < the type of objects in the pool T> PooledObjectFactory | Returns: a synchronized view of the specified PooledObjectFactory.the PooledObjectFactory to be "wrapped" in a synchronized
PooledObjectFactory. factory)Returns a synchronized (thread-safe) PooledObjectFactory backed by the specified PooledObjectFactory. |