Class StackKeyedObjectPool<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>

    public class StackKeyedObjectPool<K,​V>
    extends BaseKeyedObjectPool<K,​V>
    implements KeyedObjectPool<K,​V>
    A simple, Stack-based KeyedObjectPool implementation.

    Given a KeyedPoolableObjectFactory, this class will maintain a simple pool of instances. A finite number of "sleeping" or inactive instances is enforced, but when the pool is empty, new instances are created to support the new load. Hence this class places no limit on the number of "active" instances created by the pool, but is quite useful for re-using Objects without introducing artificial limits.

    Since:
    Pool 1.0
    Version:
    $Revision: 1222710 $ $Date: 2011-12-23 10:58:12 -0500 (Fri, 23 Dec 2011) $
    Author:
    Rodney Waldhoff, Sandy McArthur
    See Also:
    Stack