You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ps...@apache.org on 2007/12/14 02:57:49 UTC

svn commit: r604082 - /commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/java/org/apache/commons/pool/impl/GenericObjectPool.java

Author: psteitz
Date: Thu Dec 13 17:57:48 2007
New Revision: 604082

URL: http://svn.apache.org/viewvc?rev=604082&view=rev
Log:
Javadoc fixes.

Modified:
    commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/java/org/apache/commons/pool/impl/GenericObjectPool.java

Modified: commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/java/org/apache/commons/pool/impl/GenericObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/java/org/apache/commons/pool/impl/GenericObjectPool.java?rev=604082&r1=604081&r2=604082&view=diff
==============================================================================
--- commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/java/org/apache/commons/pool/impl/GenericObjectPool.java (original)
+++ commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/java/org/apache/commons/pool/impl/GenericObjectPool.java Thu Dec 13 17:57:48 2007
@@ -122,6 +122,19 @@
  *  </li>
  * </ul>
  * <p>
+ * <p>
+ * The pool can be configured to behave as a LIFO queue with respect to idle
+ * objects - always returning the most recently used object from the pool,
+ * or as a FIFO queue, where borrowObject always returns the oldest object
+ * in the idle object pool.
+ * <ul>
+ *  <li>
+ *   {@link #setLifo <i>Lifo</i>}
+ *   determines whether or not the pool returns idle objects in 
+ *   last-in-first-out order.
+ *  </li>
+ * </ul>
+ * <p>
  * GenericObjectPool is not usable without a {@link PoolableObjectFactory}.  A
  * non-<code>null</code> factory must be provided either as a constructor argument
  * or via a call to {@link #setFactory} before the pool is used.
@@ -210,6 +223,7 @@
      * queue - objects are taken from the idle object pool in the order that
      * they are returned to the pool.
      * @see #setLifo
+     * @since 1.4
      */
     public static final boolean DEFAULT_LIFO = true;
 
@@ -791,6 +805,8 @@
      * in the pool (if there are idle instances available).  False means that
      * the pool behaves as a FIFO queue - objects are taken from the idle object
      * pool in the order that they are returned to the pool.
+     * 
+     * @since 1.4
      */
      public synchronized boolean getLifo() {
          return _lifo;
@@ -802,6 +818,9 @@
       * idle instances available).  False means that the pool behaves as a FIFO
       * queue - objects are taken from the idle object pool in the order that
       * they are returned to the pool.
+      * 
+      * @param lifo the new value for the LIFO property
+      * @since 1.4
       */
      public synchronized void setLifo(boolean lifo) {
          this._lifo = lifo;