blob: 25b22b61b45b5741c0615ccbdb01111a08f43aa1 [file] [log] [blame]
<?xml version="1.0"?>
<document>
<properties>
<title>Home</title>
<author email="commons-dev@jakarta.apache.org">Commons Documentation Team</author>
<author email="rwaldhoff@apache.org">Rodney Waldhoff</author>
<revision>$Id: index.xml,v 1.1 2002/01/15 01:20:52 rwaldhoff Exp $</revision>
</properties>
<body>
<section name="The Pool Component">
<!-- this is something of a place-holder, borrowed from org.apache.commons.pool's package.html -->
<p>
The <code>org.apache.commons.pool</code> 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.
</p>
<p>
The <code>pool</code> package itself doesn't define a specific object
pooling implementation, but rather a contract that implementations may
support in order to be fully interchangeable.
</p>
<p>
The <code>pool</code> package separates the way in which instances are
pooled from the way in which they are created, resulting in a pair of
interfaces:
</p>
<dl>
<dt><code>ObjectPool</code></dt>
<dd>
defines a simple object pooling interface, with methods for
borrowing instances from and returning them to the pool.
</dd>
<dt><code>PoolableObjectFactory</code></dt>
<dd>
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.
</dd>
</dl>
<p>
<code>ObjectPoolFactory</code>
defines a simple factory for <code>ObjectPool</code>s, which may be
useful for some applications.
</p>
<p>
The <code>pool</code> package also provides a keyed pool interface,
which pools instances of multiple types, accessed according to an
arbitrary key. See
<code>KeyedObjectPool</code>,
<code>KeyedPoolableObjectFactory</code>,
and
<code>KeyedObjectPoolFactory</code>.
</p>
</section>
</body>
</document>