程序包 | 说明 |
---|---|
org.apache.commons.pool2 | |
org.apache.commons.pool2.impl |
Object pooling API implementations.
|
org.apache.commons.pool2.proxy |
Object pooling proxy implementation.
|
限定符和类型 | 类和说明 |
---|---|
class |
BaseObjectPool<T>
A simple base implementation of
ObjectPool . |
限定符和类型 | 方法和说明 |
---|---|
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.
|
限定符和类型 | 方法和说明 |
---|---|
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)
已过时。
Use
addObjects(int) . |
static <T> ObjectPool<T> |
PoolUtils.synchronizedPool(ObjectPool<T> pool)
Returns a synchronized (thread-safe) ObjectPool backed by the specified
ObjectPool.
|
限定符和类型 | 类和说明 |
---|---|
class |
GenericObjectPool<T>
A configurable
ObjectPool implementation. |
class |
SoftReferenceObjectPool<T>
A
SoftReference based ObjectPool . |
限定符和类型 | 类和说明 |
---|---|
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.
|
构造器和说明 |
---|
ProxiedObjectPool(ObjectPool<T> pool,
org.apache.commons.pool2.proxy.ProxySource<T> proxySource)
Create a new proxied object pool.
|