Class BaseKeyedObjectPool<K,V>

java.lang.Object
org.apache.commons.pool.BaseKeyedObjectPool<K,V>
Type Parameters:
K - the type of keys in this pool
V - the type of objects held in this pool
All Implemented Interfaces:
KeyedObjectPool<K,V>
Direct Known Subclasses:
GenericKeyedObjectPool, StackKeyedObjectPool

public abstract class BaseKeyedObjectPool<K,V> extends Object implements KeyedObjectPool<K,V>
A simple base implementation of KeyedObjectPool. Optional operations are implemented to either do nothing, return a value indicating it is unsupported or throw UnsupportedOperationException.
Since:
Pool 1.0
Version:
$Revision: 1222396 $ $Date: 2011-12-22 14:02:25 -0500 (Thu, 22 Dec 2011) $
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private boolean
    Whether or not the pool is close
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addObject(K key)
    Not supported in this base implementation.
    protected final void
    Throws an IllegalStateException when this pool has been closed.
    abstract V
    Obtains an instance from this pool for the specified key.
    void
    Not supported in this base implementation.
    void
    clear(K key)
    Not supported in this base implementation.
    void
    Close this pool.
    int
    Not supported in this base implementation.
    int
    Not supported in this base implementation.
    int
    Not supported in this base implementation.
    int
    Not supported in this base implementation.
    abstract void
    invalidateObject(K key, V obj)
    Invalidates an object from the pool.
    protected final boolean
    Has this pool instance been closed.
    abstract void
    returnObject(K key, V obj)
    Return an instance to the pool.
    void
    Deprecated.
    to be removed in pool 2.0

    Methods inherited from class java.lang.Object

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