| Package | Description |
|---|---|
| org.apache.commons.pool2 |
Object pooling API.
|
| org.apache.commons.pool2.impl |
Object pooling API implementations.
|
| Modifier and Type | Method and Description |
|---|---|
PooledObject<T> |
PooledObjectFactory.makeObject()
Create an instance that can be served by the pool and wrap it in a
PooledObject to be managed by the pool. |
PooledObject<T> |
BasePooledObjectFactory.makeObject() |
PooledObject<T> |
PoolUtils.SynchronizedPooledObjectFactory.makeObject()
Create an instance that can be served by the pool and wrap it in a
PooledObject to be managed by the pool. |
PooledObject<V> |
BaseKeyedPooledObjectFactory.makeObject(K key) |
PooledObject<V> |
KeyedPooledObjectFactory.makeObject(K key)
Create an instance that can be served by the pool and
wrap it in a
PooledObject to be managed by the pool. |
PooledObject<V> |
PoolUtils.SynchronizedKeyedPooledObjectFactory.makeObject(K key)
Create an instance that can be served by the pool and
wrap it in a
PooledObject to be managed by the pool. |
abstract PooledObject<T> |
BasePooledObjectFactory.wrap(T obj)
Wrap the provided instance with an implementation of
PooledObject. |
abstract PooledObject<V> |
BaseKeyedPooledObjectFactory.wrap(V value)
Wrap the provided instance with an implementation of
PooledObject. |
| Modifier and Type | Method and Description |
|---|---|
void |
BaseKeyedPooledObjectFactory.activateObject(K key,
PooledObject<V> p)
Reinitialize an instance to be returned by the pool.
|
void |
KeyedPooledObjectFactory.activateObject(K key,
PooledObject<V> p)
Reinitialize an instance to be returned by the pool.
|
void |
PoolUtils.SynchronizedKeyedPooledObjectFactory.activateObject(K key,
PooledObject<V> p)
Reinitialize an instance to be returned by the pool.
|
void |
PooledObjectFactory.activateObject(PooledObject<T> p)
Reinitialize an instance to be returned by the pool.
|
void |
BasePooledObjectFactory.activateObject(PooledObject<T> p)
No-op.
|
void |
PoolUtils.SynchronizedPooledObjectFactory.activateObject(PooledObject<T> p)
Reinitialize an instance to be returned by the pool.
|
int |
PooledObject.compareTo(PooledObject<T> other)
Orders instances based on idle time - i.e.
|
void |
BaseKeyedPooledObjectFactory.destroyObject(K key,
PooledObject<V> p)
Destroy an instance no longer needed by the pool.
|
void |
KeyedPooledObjectFactory.destroyObject(K key,
PooledObject<V> p)
Destroy an instance no longer needed by the pool.
|
void |
PoolUtils.SynchronizedKeyedPooledObjectFactory.destroyObject(K key,
PooledObject<V> p)
Destroy an instance no longer needed by the pool.
|
void |
PooledObjectFactory.destroyObject(PooledObject<T> p)
Destroys an instance no longer needed by the pool.
|
void |
BasePooledObjectFactory.destroyObject(PooledObject<T> p)
No-op.
|
void |
PoolUtils.SynchronizedPooledObjectFactory.destroyObject(PooledObject<T> p)
Destroys an instance no longer needed by the pool.
|
void |
BaseKeyedPooledObjectFactory.passivateObject(K key,
PooledObject<V> p)
Uninitialize an instance to be returned to the idle object pool.
|
void |
KeyedPooledObjectFactory.passivateObject(K key,
PooledObject<V> p)
Uninitialize an instance to be returned to the idle object pool.
|
void |
PoolUtils.SynchronizedKeyedPooledObjectFactory.passivateObject(K key,
PooledObject<V> p)
Uninitialize an instance to be returned to the idle object pool.
|
void |
PooledObjectFactory.passivateObject(PooledObject<T> p)
Uninitialize an instance to be returned to the idle object pool.
|
void |
BasePooledObjectFactory.passivateObject(PooledObject<T> p)
No-op.
|
void |
PoolUtils.SynchronizedPooledObjectFactory.passivateObject(PooledObject<T> p)
Uninitialize an instance to be returned to the idle object pool.
|
boolean |
BaseKeyedPooledObjectFactory.validateObject(K key,
PooledObject<V> p)
Ensures that the instance is safe to be returned by the pool.
|
boolean |
KeyedPooledObjectFactory.validateObject(K key,
PooledObject<V> p)
Ensures that the instance is safe to be returned by the pool.
|
boolean |
PoolUtils.SynchronizedKeyedPooledObjectFactory.validateObject(K key,
PooledObject<V> p)
Ensures that the instance is safe to be returned by the pool.
|
boolean |
PooledObjectFactory.validateObject(PooledObject<T> p)
Ensures that the instance is safe to be returned by the pool.
|
boolean |
BasePooledObjectFactory.validateObject(PooledObject<T> p)
This implementation always returns
true. |
boolean |
PoolUtils.SynchronizedPooledObjectFactory.validateObject(PooledObject<T> p)
Ensures that the instance is safe to be returned by the pool.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
PooledObject.endEvictionTest(java.util.Deque<PooledObject<T>> idleQueue)
Called to inform the object that the eviction test has ended.
|
| Modifier and Type | Class and Description |
|---|---|
class |
DefaultPooledObject<T>
This wrapper is used to track the additional information, such as state, for
the pooled objects.
|
class |
PooledSoftReference<T>
Extension of
DefaultPooledObject to wrap pooled soft references. |
| Modifier and Type | Field and Description |
|---|---|
private PooledObject<?> |
DefaultPooledObjectInfo.pooledObject |
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<BaseGenericObjectPool.IdentityWrapper<T>,PooledObject<T>> |
GenericObjectPool.allObjects |
private java.util.Map<BaseGenericObjectPool.IdentityWrapper<S>,PooledObject<S>> |
GenericKeyedObjectPool.ObjectDeque.allObjects |
private java.util.Iterator<PooledObject<T>> |
BaseGenericObjectPool.EvictionIterator.idleObjectIterator |
private java.util.Deque<PooledObject<T>> |
BaseGenericObjectPool.EvictionIterator.idleObjects |
private LinkedBlockingDeque<PooledObject<T>> |
GenericObjectPool.idleObjects |
private LinkedBlockingDeque<PooledObject<S>> |
GenericKeyedObjectPool.ObjectDeque.idleObjects |
| Modifier and Type | Method and Description |
|---|---|
private PooledObject<T> |
GenericObjectPool.create()
Attempts to create a new wrapped pooled object.
|
private PooledObject<T> |
GenericKeyedObjectPool.create(K key)
Create a new pooled object.
|
PooledObject<T> |
BaseGenericObjectPool.EvictionIterator.next() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<BaseGenericObjectPool.IdentityWrapper<S>,PooledObject<S>> |
GenericKeyedObjectPool.ObjectDeque.getAllObjects()
Obtain all the objects for the current key.
|
java.util.Deque<PooledObject<T>> |
BaseGenericObjectPool.EvictionIterator.getIdleObjects()
Returns the idle object deque referenced by this iterator.
|
LinkedBlockingDeque<PooledObject<S>> |
GenericKeyedObjectPool.ObjectDeque.getIdleObjects()
Obtain the idle objects for the current key.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
GenericKeyedObjectPool.addIdleObject(K key,
PooledObject<T> p)
Add an object to the set of idle objects for a given key.
|
private void |
GenericObjectPool.addIdleObject(PooledObject<T> p)
Add the provided wrapped pooled object to the set of idle objects for
this pool.
|
int |
DefaultPooledObject.compareTo(PooledObject<T> other) |
private boolean |
GenericKeyedObjectPool.destroy(K key,
PooledObject<T> toDestroy,
boolean always)
Destroy the wrapped, pooled object.
|
private void |
GenericObjectPool.destroy(PooledObject<T> toDestory)
Destroys a wrapped pooled object.
|
boolean |
EvictionPolicy.evict(EvictionConfig config,
PooledObject<T> underTest,
int idleCount)
This method is called to test if an idle object in the pool should be
evicted or not.
|
boolean |
DefaultEvictionPolicy.evict(EvictionConfig config,
PooledObject<T> underTest,
int idleCount) |
(package private) void |
BaseGenericObjectPool.updateStatsBorrow(PooledObject<T> p,
long waitTime)
Updates statistics after an object is borrowed from the pool.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
DefaultPooledObject.endEvictionTest(java.util.Deque<PooledObject<T>> idleQueue) |
| Constructor and Description |
|---|
DefaultPooledObjectInfo(PooledObject<?> pooledObject)
Create a new instance for the given pooled object.
|
| Constructor and Description |
|---|
EvictionIterator(java.util.Deque<PooledObject<T>> idleObjects)
Create an EvictionIterator for the provided idle instance deque.
|