| Package | Description |
|---|---|
| org.apache.commons.pool2 |
Object pooling API.
|
| org.apache.commons.pool2.impl |
Object pooling API implementations.
|
| org.apache.commons.pool2.proxy |
Object pooling proxy implementation.
|
| Modifier and Type | Class and Description |
|---|---|
class |
BaseObjectPool<T>
A simple base implementation of
ObjectPool. |
private static class |
PoolUtils.ErodingObjectPool<T>
Decorates an object pool, adding "eroding" behavior.
|
private static class |
PoolUtils.SynchronizedObjectPool<T>
A synchronized (thread-safe) ObjectPool backed by the specified
ObjectPool.
|
| Modifier and Type | Field and Description |
|---|---|
private ObjectPool<T> |
PoolUtils.ObjectPoolMinIdleTimerTask.pool
Object pool
|
private ObjectPool<T> |
PoolUtils.SynchronizedObjectPool.pool
the underlying object pool
|
private ObjectPool<T> |
PoolUtils.ErodingObjectPool.pool
Underlying object pool
|
| Modifier and Type | Method and Description |
|---|---|
static <T> ObjectPool<T> |
PoolUtils.erodingPool(ObjectPool<T> pool)
Returns a pool that adaptively decreases its 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 its 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 <T> java.util.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 its 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 its 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.
|
| Constructor and Description |
|---|
ErodingObjectPool(ObjectPool<T> pool,
float factor)
Create an ErodingObjectPool wrapping the given pool using the
specified erosion factor.
|
ObjectPoolMinIdleTimerTask(ObjectPool<T> pool,
int minIdle)
Create a new ObjectPoolMinIdleTimerTask for the given pool with the
given minIdle setting.
|
SynchronizedObjectPool(ObjectPool<T> pool)
Create a new SynchronizedObjectPool wrapping the given pool.
|
| Modifier and Type | Class and Description |
|---|---|
class |
GenericObjectPool<T>
A configurable
ObjectPool implementation. |
class |
SoftReferenceObjectPool<T>
A
SoftReference based ObjectPool. |
| Modifier and Type | Class and Description |
|---|---|
class |
ProxiedObjectPool<T>
Create a new object pool where the pooled objects are wrapped in proxies
allowing better control of pooled objects and in particular the prevention
of the continued use of an object by a client after that client returns the
object to the pool.
|
| Modifier and Type | Field and Description |
|---|---|
private ObjectPool<T> |
ProxiedObjectPool.pool |
| Constructor and Description |
|---|
ProxiedObjectPool(ObjectPool<T> pool,
ProxySource<T> proxySource)
Create a new proxied object pool.
|