Package | Description |
---|---|
org.apache.commons.pool |
Object pooling API.
|
org.apache.commons.pool.impl |
Object pooling API implementations.
|
Modifier and Type | Class and Description |
---|---|
class |
BaseObjectPool<T>
A simple base implementation of
ObjectPool . |
Modifier and Type | Method and Description |
---|---|
static <V> ObjectPool<V> |
PoolUtils.adapt(KeyedObjectPool<Object,V> keyedPool)
Adapt a
KeyedObjectPool instance to work where an ObjectPool is needed. |
static <V> ObjectPool<V> |
PoolUtils.adapt(KeyedObjectPool<Object,V> keyedPool,
Object key)
Adapt a
KeyedObjectPool instance to work where an ObjectPool is needed using the
specified key when delegating. |
static <T> ObjectPool<T> |
PoolUtils.checkedPool(ObjectPool<T> pool,
Class<T> type)
Wraps an
ObjectPool and dynamically checks the type of objects borrowed and returned to the pool. |
ObjectPool<T> |
ObjectPoolFactory.createPool()
Create and return a new
ObjectPool . |
static <T> ObjectPool<T> |
PoolUtils.erodingPool(ObjectPool<T> pool)
Returns a pool that adaptively decreases it's size when idle objects are no longer needed.
|
static <T> ObjectPool<T> |
PoolUtils.erodingPool(ObjectPool<T> pool,
float factor)
Returns a pool that adaptively decreases it's size when idle objects are no longer needed.
|
static <T> ObjectPool<T> |
PoolUtils.synchronizedPool(ObjectPool<T> pool)
Returns a synchronized (thread-safe) ObjectPool backed by the specified ObjectPool.
|
Modifier and Type | Method and Description |
---|---|
static <K,V> KeyedObjectPool<K,V> |
PoolUtils.adapt(ObjectPool<V> pool)
Adapt an
ObjectPool to work where an KeyedObjectPool is needed. |
static <T> ObjectPool<T> |
PoolUtils.checkedPool(ObjectPool<T> pool,
Class<T> type)
Wraps an
ObjectPool and dynamically checks the type of objects borrowed and returned to the pool. |
static <T> TimerTask |
PoolUtils.checkMinIdle(ObjectPool<T> pool,
int minIdle,
long period)
Periodically check the idle object count for the pool.
|
static <T> ObjectPool<T> |
PoolUtils.erodingPool(ObjectPool<T> pool)
Returns a pool that adaptively decreases it's size when idle objects are no longer needed.
|
static <T> ObjectPool<T> |
PoolUtils.erodingPool(ObjectPool<T> pool,
float factor)
Returns a pool that adaptively decreases it's size when idle objects are no longer needed.
|
static <T> void |
PoolUtils.prefill(ObjectPool<T> pool,
int count)
Call
addObject() on pool count number of times. |
static <T> ObjectPool<T> |
PoolUtils.synchronizedPool(ObjectPool<T> pool)
Returns a synchronized (thread-safe) ObjectPool backed by the specified ObjectPool.
|
Modifier and Type | Class and Description |
---|---|
class |
GenericObjectPool<T>
A configurable
ObjectPool implementation. |
class |
SoftReferenceObjectPool<T>
A
SoftReference based
ObjectPool . |
class |
StackObjectPool<T>
A simple,
Stack -based ObjectPool implementation. |
Modifier and Type | Method and Description |
---|---|
ObjectPool<T> |
GenericObjectPoolFactory.createPool()
Create and return a new
ObjectPool . |
ObjectPool<T> |
StackObjectPoolFactory.createPool()
Create a StackObjectPool.
|
Copyright © 2001-2015 The Apache Software Foundation. All Rights Reserved.