Class PoolUtils.KeyedObjectPoolAdaptor<K,V>

java.lang.Object
org.apache.commons.pool.PoolUtils.KeyedObjectPoolAdaptor<K,V>
All Implemented Interfaces:
KeyedObjectPool<K,V>
Enclosing class:
PoolUtils

private static class PoolUtils.KeyedObjectPoolAdaptor<K,V> extends Object implements KeyedObjectPool<K,V>
Adapts an ObjectPool to implement KeyedObjectPool by ignoring key arguments.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final ObjectPool<V>
    Underlying pool
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create a new KeyedObjectPoolAdaptor wrapping the given ObjectPool
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addObject(K key)
    Add an object to the pool, ignoring the key
    Borrow and object from the pool, ignoring the key
    void
    Clears the pool, removing all pooled instances (optional operation).
    void
    clear(K key)
    Clear the pool, ignoring the key (has same effect as clear().
    void
    Close this pool, and free any resources associated with it.
    int
    Returns the total number of instances current borrowed from this pool but not yet returned (optional operation).
    int
    Return the number of objects checked out from the pool, ignoring the key.
    int
    Returns the total number of instances currently idle in this pool (optional operation).
    int
    Return the number of objects idle in the pool, ignoring the key.
    void
    invalidateObject(K key, V obj)
    Invalidate and object, ignoring the key
    void
    returnObject(K key, V obj)
    Return and object to the pool, ignoring the key
    void
    Deprecated.
    to be removed in version 2.0

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait