The org.apache.commons.pool package defines a simple
interface for a pool of object instances, and a handful of base
classes that may be useful when creating pool implementations.
The pool package itself doesn't define a specific object
pooling implementation, but rather a contract that implementations may
support in order to be fully interchangeable.
The pool package separates the way in which instances are
pooled from the way in which they are created, resulting in a pair of
interfaces:
defines lifecycle methods for object instances contained within a pool.
By associating a factory with a pool, the pool can create new object
instances as needed.
ObjectPoolFactory
defines a simple factory for ObjectPools, which may be
useful for some applications.
Object pooling API.
The
org.apache.commons.poolpackage defines a simple interface for a pool of object instances, and a handful of base classes that may be useful when creating pool implementations.The
poolpackage itself doesn't define a specific object pooling implementation, but rather a contract that implementations may support in order to be fully interchangeable.The
poolpackage separates the way in which instances are pooled from the way in which they are created, resulting in a pair of interfaces:ObjectPoolFactory defines a simple factory for
ObjectPools, which may be useful for some applications.The
poolpackage also provides a keyed pool interface, which pools instances of multiple types, accessed according to an arbitrary key. See KeyedObjectPool , KeyedPoolableObjectFactory , and KeyedObjectPoolFactory .