blob: e18b94792a1434d978df7fea8892ea6018f0d665 [file]
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<document xmlns="http://maven.apache.org/XDOC/2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
<properties>
<title>Developers Guide</title>
<author email="dev@commons.apache.org">Apache Commons Documentation Team</author>
</properties>
<body>
<section name="ObjectPool">
<p>
<a href="../apidocs/org/apache/commons/pool2/ObjectPool.html">ObjectPool</a>
defines a simple pooling interface.
</p>
<ul>
<li>
<a href="../apidocs/org/apache/commons/pool2/impl/GenericObjectPool.html">GenericObjectPool</a>:
ObjectPool implementation with configurable LIFO/FIFO behavior.
The default behavior is for the pool to act as a LIFO queue. What this
means is that when there are idle objects available in the pool,
borrowObject returns the most recently returned ("last in") instance.
If the <code>lifo</code> the property of the pool false, instances are
returned in the opposite order - first-in, first-out.
</li>
<li>
<a href="../apidocs/org/apache/commons/pool2/impl/SoftReferenceObjectPool.html">SoftReferenceObjectPool</a>:
ObjectPool implementation with a LIFO (Last In First Out) behavior. Additionally this pool wraps
each object in a SoftReference allowing the garbage collector to remove them in response to
memory demand.
</li>
</ul>
</section>
<section name="KeyedObjectPool">
<p>
A <a href="../apidocs/org/apache/commons/pool2/KeyedObjectPool.html">KeyedObjectPool</a>
pools instances of multiple types. Each type may be accessed using an arbitrary key.
</p>
<ul>
<li>
<a href="../apidocs/org/apache/commons/pool2/impl/GenericKeyedObjectPool.html">GenericKeyedObjectPool</a>:
ObjectPool implementation with configurable LIFO/FIFO behavior.
The default behavior is for the pool to act as a LIFO queue. What this
means is that when there are idle objects available in the pool,
borrowObject returns the most recently returned ("last in") instance.
If the <code>lifo</code> the property of the pool false, instances are
returned in the opposite order - first-in, first-out.
</li>
</ul>
</section>
</body>
</document>