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