commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1021856 - in /commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl: GenericKeyedObjectPool.java GenericObjectPool.java GenericObjectPoolFactory.java
Date Tue, 12 Oct 2010 17:45:08 GMT
Author: sebb
Date: Tue Oct 12 17:45:07 2010
New Revision: 1021856

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

Modified:
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPool.java
    commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPoolFactory.java

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java?rev=1021856&r1=1021855&r2=1021856&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
Tue Oct 12 17:45:07 2010
@@ -81,18 +81,18 @@ import org.apache.commons.pool.PoolUtils
  *    <ul>
  *    <li>
  *      When {@link #setWhenExhaustedAction whenExhaustedAction} is
- *      {@link #WHEN_EXHAUSTED_FAIL}, {@link #borrowObject borrowObject} will throw
+ *      {@link WhenExhaustedAction#FAIL}, {@link #borrowObject borrowObject} will throw
  *      a {@link NoSuchElementException}
  *    </li>
  *    <li>
  *      When {@link #setWhenExhaustedAction whenExhaustedAction} is
- *      {@link #WHEN_EXHAUSTED_GROW}, {@link #borrowObject borrowObject} will create a new
+ *      {@link WhenExhaustedAction#GROW}, {@link #borrowObject borrowObject} will create
a new
  *      object and return it (essentially making {@link #setMaxActive maxActive}
  *      meaningless.)
  *    </li>
  *    <li>
  *      When {@link #setWhenExhaustedAction whenExhaustedAction}
- *      is {@link #WHEN_EXHAUSTED_BLOCK}, {@link #borrowObject borrowObject} will block
+ *      is {@link WhenExhaustedAction#BLOCK}, {@link #borrowObject borrowObject} will block
  *      (invoke {@link Object#wait() wait} until a new or idle object is available.
  *      If a positive {@link #setMaxWait maxWait}
  *      value is supplied, the {@link #borrowObject borrowObject} will block for at
@@ -102,7 +102,7 @@ import org.apache.commons.pool.PoolUtils
  *    </li>
  *    </ul>
  *    The default <code>whenExhaustedAction</code> setting is
- *    {@link #WHEN_EXHAUSTED_BLOCK}.
+ *    {@link WhenExhaustedAction#BLOCK}.
  *  </li>
  *  <li>
  *    When {@link #setTestOnBorrow testOnBorrow} is set, the pool will
@@ -229,9 +229,9 @@ public class GenericKeyedObjectPool<K,V>
 
     /**
      * The default "when exhausted action" for the pool.
-     * @see #WHEN_EXHAUSTED_BLOCK
-     * @see #WHEN_EXHAUSTED_FAIL
-     * @see #WHEN_EXHAUSTED_GROW
+     * @see WhenExhaustedAction#BLOCK
+     * @see WhenExhaustedAction#FAIL
+     * @see WhenExhaustedAction#GROW
      * @see #setWhenExhaustedAction
      */
     public static final WhenExhaustedAction DEFAULT_WHEN_EXHAUSTED_ACTION = WhenExhaustedAction.BLOCK;
@@ -241,7 +241,7 @@ public class GenericKeyedObjectPool<K,V>
      * {@link #borrowObject} method should block before throwing
      * an exception when the pool is exhausted and the
      * {@link #getWhenExhaustedAction "when exhausted" action} is
-     * {@link #WHEN_EXHAUSTED_BLOCK}.
+     * {@link WhenExhaustedAction#BLOCK}.
      * @see #getMaxWait
      * @see #setMaxWait
      */
@@ -368,7 +368,7 @@ public class GenericKeyedObjectPool<K,V>
      * @param maxActive the maximum number of objects that can be borrowed from me at one
time (see {@link #setMaxActive})
      * @param whenExhaustedAction the action to take when the pool is exhausted (see {@link
#setWhenExhaustedAction})
      * @param maxWait the maximum amount of time to wait for an idle object when the pool
is exhausted and
-     *  <code>whenExhaustedAction</code> is {@link #WHEN_EXHAUSTED_BLOCK} (otherwise
ignored) (see {@link #setMaxWait})
+     *  <code>whenExhaustedAction</code> is {@link WhenExhaustedAction#BLOCK}
(otherwise ignored) (see {@link #setMaxWait})
      */
     public GenericKeyedObjectPool(KeyedPoolableObjectFactory<K,V> factory, int maxActive,
             WhenExhaustedAction whenExhaustedAction, long maxWait) {
@@ -383,7 +383,7 @@ public class GenericKeyedObjectPool<K,V>
      * if not <code>null</code>
      * @param maxActive the maximum number of objects that can be borrowed from me at one
time (see {@link #setMaxActive})
      * @param maxWait the maximum amount of time to wait for an idle object when the pool
is exhausted and
-     * <code>whenExhaustedAction</code> is {@link #WHEN_EXHAUSTED_BLOCK} (otherwise
ignored) (see {@link #setMaxWait})
+     * <code>whenExhaustedAction</code> is {@link WhenExhaustedAction#BLOCK}
(otherwise ignored) (see {@link #setMaxWait})
      * @param whenExhaustedAction the action to take when the pool is exhausted (see {@link
#setWhenExhaustedAction})
      * @param testOnBorrow whether or not to validate objects before they are returned by
the {@link #borrowObject}
      * method (see {@link #setTestOnBorrow})
@@ -405,7 +405,7 @@ public class GenericKeyedObjectPool<K,V>
      * (see {@link #setMaxActive})
      * @param whenExhaustedAction the action to take when the pool is exhausted (see {@link
#setWhenExhaustedAction})
      * @param maxWait the maximum amount of time to wait for an idle object when the pool
is exhausted and
-     * <code>whenExhaustedAction</code> is {@link #WHEN_EXHAUSTED_BLOCK} (otherwise
ignored) (see {@link #setMaxWait})
+     * <code>whenExhaustedAction</code> is {@link WhenExhaustedAction#BLOCK}
(otherwise ignored) (see {@link #setMaxWait})
      * @param maxIdle the maximum number of idle objects in my pool (see {@link #setMaxIdle})
      */
     public GenericKeyedObjectPool(KeyedPoolableObjectFactory<K,V> factory, int maxActive,
@@ -423,7 +423,7 @@ public class GenericKeyedObjectPool<K,V>
      * (see {@link #setMaxActive})
      * @param whenExhaustedAction the action to take when the pool is exhausted (see {@link
#setWhenExhaustedAction})
      * @param maxWait the maximum amount of time to wait for an idle object when the pool
is exhausted and
-     * <code>whenExhaustedAction</code> is {@link #WHEN_EXHAUSTED_BLOCK} (otherwise
ignored) (see {@link #getMaxWait})
+     * <code>whenExhaustedAction</code> is {@link WhenExhaustedAction#BLOCK}
(otherwise ignored) (see {@link #getMaxWait})
      * @param maxIdle the maximum number of idle objects in my pool (see {@link #setMaxIdle})
      * @param testOnBorrow whether or not to validate objects before they are returned by
the {@link #borrowObject}
      * method (see {@link #setTestOnBorrow})
@@ -446,7 +446,7 @@ public class GenericKeyedObjectPool<K,V>
      * @param whenExhaustedAction the action to take when the pool is exhausted 
      * (see {@link #setWhenExhaustedAction})
      * @param maxWait the maximum amount of time to wait for an idle object when the pool
is exhausted and
-     * <code>whenExhaustedAction</code> is {@link #WHEN_EXHAUSTED_BLOCK} (otherwise
ignored) (see {@link #setMaxWait})
+     * <code>whenExhaustedAction</code> is {@link WhenExhaustedAction#BLOCK}
(otherwise ignored) (see {@link #setMaxWait})
      * @param maxIdle the maximum number of idle objects in my pool (see {@link #setMaxIdle})
      * @param testOnBorrow whether or not to validate objects before they are returned by
the {@link #borrowObject}
      * method (see {@link #setTestOnBorrow})
@@ -477,7 +477,7 @@ public class GenericKeyedObjectPool<K,V>
      * (see {@link #setMaxActive})
      * @param whenExhaustedAction the action to take when the pool is exhausted (see {@link
#setWhenExhaustedAction})
      * @param maxWait the maximum amount of time to wait for an idle object when the pool
is exhausted and
-     * <code>whenExhaustedAction</code> is {@link #WHEN_EXHAUSTED_BLOCK} (otherwise
ignored) (see {@link #setMaxWait})
+     * <code>whenExhaustedAction</code> is {@link WhenExhaustedAction#BLOCK}
(otherwise ignored) (see {@link #setMaxWait})
      * @param maxIdle the maximum number of idle objects in my pool (see {@link #setMaxIdle})
      * @param maxTotal the maximum number of objects that can exists at one time (see {@link
#setMaxTotal})
      * @param testOnBorrow whether or not to validate objects before they are returned by
the {@link #borrowObject}
@@ -509,7 +509,7 @@ public class GenericKeyedObjectPool<K,V>
      * @param maxActive the maximum number of objects that can be borrowed at one time (see
{@link #setMaxActive})
      * @param whenExhaustedAction the action to take when the pool is exhausted (see {@link
#setWhenExhaustedAction})
      * @param maxWait the maximum amount of time to wait for an idle object when the pool
is exhausted and
-     * <code>whenExhaustedAction</code> is {@link #WHEN_EXHAUSTED_BLOCK} (otherwise
ignored) (see {@link #setMaxWait})
+     * <code>whenExhaustedAction</code> is {@link WhenExhaustedAction#BLOCK}
(otherwise ignored) (see {@link #setMaxWait})
      * @param maxIdle the maximum number of idle objects in my pool (see {@link #setMaxIdle})
      * @param maxTotal the maximum number of objects that can exists at one time (see {@link
#setMaxTotal})
      * @param minIdle the minimum number of idle objects to have in the pool at any one time
(see {@link #setMinIdle})
@@ -545,7 +545,7 @@ public class GenericKeyedObjectPool<K,V>
      *  (see {@link #setMaxActive})
      * @param whenExhaustedAction the action to take when the pool is exhausted (see {@link
#setWhenExhaustedAction})
      * @param maxWait the maximum amount of time to wait for an idle object when the pool
is exhausted and
-     * <code>whenExhaustedAction</code> is {@link #WHEN_EXHAUSTED_BLOCK} (otherwise
ignored) (see {@link #setMaxWait})
+     * <code>whenExhaustedAction</code> is {@link WhenExhaustedAction#BLOCK}
(otherwise ignored) (see {@link #setMaxWait})
      * @param maxIdle the maximum number of idle objects in my pool (see {@link #setMaxIdle})
      * @param maxTotal the maximum number of objects that can exists at one time (see {@link
#setMaxTotal})
      * @param minIdle the minimum number of idle objects to have in the pool at any one time
(see {@link #setMinIdle})
@@ -649,8 +649,8 @@ public class GenericKeyedObjectPool<K,V>
      * is invoked when the pool is exhausted (the maximum number
      * of "active" objects has been reached).
      *
-     * @return one of {@link #WHEN_EXHAUSTED_BLOCK},
-     * {@link #WHEN_EXHAUSTED_FAIL} or {@link #WHEN_EXHAUSTED_GROW}
+     * @return one of {@link WhenExhaustedAction#BLOCK},
+     * {@link WhenExhaustedAction#FAIL} or {@link WhenExhaustedAction#GROW}
      * @see #setWhenExhaustedAction
      */
     public synchronized WhenExhaustedAction getWhenExhaustedAction() {
@@ -676,7 +676,7 @@ public class GenericKeyedObjectPool<K,V>
      * {@link #borrowObject} method should block before throwing
      * an exception when the pool is exhausted and the
      * {@link #setWhenExhaustedAction "when exhausted" action} is
-     * {@link #WHEN_EXHAUSTED_BLOCK}.
+     * {@link WhenExhaustedAction#BLOCK}.
      *
      * When less than or equal to 0, the {@link #borrowObject} method
      * may block indefinitely.
@@ -684,7 +684,7 @@ public class GenericKeyedObjectPool<K,V>
      * @return the maximum number of milliseconds borrowObject will block.
      * @see #setMaxWait
      * @see #setWhenExhaustedAction
-     * @see #WHEN_EXHAUSTED_BLOCK
+     * @see WhenExhaustedAction#BLOCK
      */
     public synchronized long getMaxWait() {
         return _maxWait;
@@ -695,7 +695,7 @@ public class GenericKeyedObjectPool<K,V>
      * {@link #borrowObject} method should block before throwing
      * an exception when the pool is exhausted and the
      * {@link #setWhenExhaustedAction "when exhausted" action} is
-     * {@link #WHEN_EXHAUSTED_BLOCK}.
+     * {@link WhenExhaustedAction#BLOCK}.
      *
      * When less than or equal to 0, the {@link #borrowObject} method
      * may block indefinitely.
@@ -703,7 +703,7 @@ public class GenericKeyedObjectPool<K,V>
      * @param maxWait the maximum number of milliseconds borrowObject will block or negative
for indefinitely.
      * @see #getMaxWait
      * @see #setWhenExhaustedAction
-     * @see #WHEN_EXHAUSTED_BLOCK
+     * @see WhenExhaustedAction#BLOCK
      */
     public synchronized void setMaxWait(long maxWait) {
         _maxWait = maxWait;
@@ -1006,8 +1006,8 @@ public class GenericKeyedObjectPool<K,V>
      * is created, activated and (if applicable) validated and returned to the caller.</p>
      * 
      * <p>If the associated keyed pool is exhausted (no available idle instances and
no capacity to create new ones),
-     * this method will either block ({@link #WHEN_EXHAUSTED_BLOCK}), throw a <code>NoSuchElementException</code>
-     * ({@link #WHEN_EXHAUSTED_FAIL}), or grow ({@link #WHEN_EXHAUSTED_GROW} - ignoring maxActive,
maxTotal properties).
+     * this method will either block ({@link WhenExhaustedAction#BLOCK}), throw a <code>NoSuchElementException</code>
+     * ({@link WhenExhaustedAction#FAIL}), or grow ({@link WhenExhaustedAction#GROW} - ignoring
maxActive, maxTotal properties).
      * The length of time that this method will block when <code>whenExhaustedAction
== WHEN_EXHAUSTED_BLOCK</code>
      * is determined by the {@link #getMaxWait() maxWait} property.</p>
      * 
@@ -2465,14 +2465,14 @@ public class GenericKeyedObjectPool<K,V>
      * {@link #borrowObject} method should block before throwing
      * an exception when the pool is exhausted and the
      * {@link #getWhenExhaustedAction "when exhausted" action} is
-     * {@link #WHEN_EXHAUSTED_BLOCK}.
+     * {@link WhenExhaustedAction#BLOCK}.
      *
      * When less than or equal to 0, the {@link #borrowObject} method
      * may block indefinitely.
      *
      * @see #setMaxWait
      * @see #getMaxWait
-     * @see #WHEN_EXHAUSTED_BLOCK
+     * @see WhenExhaustedAction#BLOCK
      * @see #setWhenExhaustedAction
      * @see #getWhenExhaustedAction
      */

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPool.java?rev=1021856&r1=1021855&r2=1021856&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPool.java
Tue Oct 12 17:45:07 2010
@@ -60,18 +60,18 @@ import org.apache.commons.pool.impl.Gene
  *    <ul>
  *    <li>
  *      When {@link #setWhenExhaustedAction <i>whenExhaustedAction</i>} is
- *      {@link #WHEN_EXHAUSTED_FAIL}, {@link #borrowObject} will throw
+ *      {@link WhenExhaustedAction#FAIL}, {@link #borrowObject} will throw
  *      a {@link NoSuchElementException}
  *    </li>
  *    <li>
  *      When {@link #setWhenExhaustedAction <i>whenExhaustedAction</i>} is
- *      {@link #WHEN_EXHAUSTED_GROW}, {@link #borrowObject} will create a new
+ *      {@link WhenExhaustedAction#GROW}, {@link #borrowObject} will create a new
  *      object and return it (essentially making {@link #setMaxActive <i>maxActive</i>}
  *      meaningless.)
  *    </li>
  *    <li>
  *      When {@link #setWhenExhaustedAction <i>whenExhaustedAction</i>}
- *      is {@link #WHEN_EXHAUSTED_BLOCK}, {@link #borrowObject} will block
+ *      is {@link WhenExhaustedAction#BLOCK}, {@link #borrowObject} will block
  *      (invoke {@link Object#wait()}) until a new or idle object is available.
  *      If a positive {@link #setMaxWait <i>maxWait</i>}
  *      value is supplied, then {@link #borrowObject} will block for at
@@ -81,7 +81,7 @@ import org.apache.commons.pool.impl.Gene
  *    </li>
  *    </ul>
  *    The default <code>whenExhaustedAction</code> setting is
- *    {@link #WHEN_EXHAUSTED_BLOCK} and the default <code>maxWait</code>
+ *    {@link WhenExhaustedAction#BLOCK} and the default <code>maxWait</code>
  *    setting is -1. By default, therefore, <code>borrowObject</code> will
  *    block indefinitely until an idle instance becomes available.
  *  </li>
@@ -214,9 +214,9 @@ public class GenericObjectPool<T> extend
 
     /**
      * The default "when exhausted action" for the pool.
-     * @see #WHEN_EXHAUSTED_BLOCK
-     * @see #WHEN_EXHAUSTED_FAIL
-     * @see #WHEN_EXHAUSTED_GROW
+     * @see WhenExhaustedAction#BLOCK
+     * @see WhenExhaustedAction#FAIL
+     * @see WhenExhaustedAction#GROW
      * @see #setWhenExhaustedAction
      */
     public static final WhenExhaustedAction DEFAULT_WHEN_EXHAUSTED_ACTION = WhenExhaustedAction.BLOCK;
@@ -237,7 +237,7 @@ public class GenericObjectPool<T> extend
      * {@link #borrowObject} method should block before throwing
      * an exception when the pool is exhausted and the
      * {@link #getWhenExhaustedAction "when exhausted" action} is
-     * {@link #WHEN_EXHAUSTED_BLOCK}.
+     * {@link WhenExhaustedAction#BLOCK}.
      * @see #getMaxWait
      * @see #setMaxWait
      */
@@ -347,7 +347,7 @@ public class GenericObjectPool<T> extend
      * @param maxActive the maximum number of objects that can be borrowed from me at one
time (see {@link #setMaxActive})
      * @param whenExhaustedAction the action to take when the pool is exhausted (see {@link
#getWhenExhaustedAction})
      * @param maxWait the maximum amount of time to wait for an idle object when the pool
is exhausted an and
-     * <i>whenExhaustedAction</i> is {@link #WHEN_EXHAUSTED_BLOCK} (otherwise
ignored) (see {@link #getMaxWait})
+     * <i>whenExhaustedAction</i> is {@link WhenExhaustedAction#BLOCK} (otherwise
ignored) (see {@link #getMaxWait})
      */
     public GenericObjectPool(PoolableObjectFactory<T> factory, int maxActive, WhenExhaustedAction
whenExhaustedAction, long maxWait) {
         this(factory, maxActive, whenExhaustedAction, maxWait, DEFAULT_MAX_IDLE, DEFAULT_MIN_IDLE,
DEFAULT_TEST_ON_BORROW,
@@ -361,7 +361,7 @@ public class GenericObjectPool<T> extend
      * @param maxActive the maximum number of objects that can be borrowed at one time (see
{@link #setMaxActive})
      * @param whenExhaustedAction the action to take when the pool is exhausted (see {@link
#getWhenExhaustedAction})
      * @param maxWait the maximum amount of time to wait for an idle object when the pool
is exhausted an and
-     * <i>whenExhaustedAction</i> is {@link #WHEN_EXHAUSTED_BLOCK} (otherwise
ignored) (see {@link #getMaxWait})
+     * <i>whenExhaustedAction</i> is {@link WhenExhaustedAction#BLOCK} (otherwise
ignored) (see {@link #getMaxWait})
      * @param testOnBorrow whether or not to validate objects before they are returned by
the {@link #borrowObject} method
      * (see {@link #getTestOnBorrow})
      * @param testOnReturn whether or not to validate objects after they are returned to
the {@link #returnObject} method
@@ -380,7 +380,7 @@ public class GenericObjectPool<T> extend
      * @param maxActive the maximum number of objects that can be borrowed at one time (see
{@link #setMaxActive})
      * @param whenExhaustedAction the action to take when the pool is exhausted (see {@link
#getWhenExhaustedAction})
      * @param maxWait the maximum amount of time to wait for an idle object when the pool
is exhausted and 
-     * <i>whenExhaustedAction</i> is {@link #WHEN_EXHAUSTED_BLOCK} (otherwise
ignored) (see {@link #getMaxWait})
+     * <i>whenExhaustedAction</i> is {@link WhenExhaustedAction#BLOCK} (otherwise
ignored) (see {@link #getMaxWait})
      * @param maxIdle the maximum number of idle objects in my pool (see {@link #getMaxIdle})
      */
     public GenericObjectPool(PoolableObjectFactory<T> factory, int maxActive, WhenExhaustedAction
whenExhaustedAction,
@@ -396,7 +396,7 @@ public class GenericObjectPool<T> extend
      * @param maxActive the maximum number of objects that can be borrowed at one time (see
{@link #setMaxActive})
      * @param whenExhaustedAction the action to take when the pool is exhausted (see {@link
#getWhenExhaustedAction})
      * @param maxWait the maximum amount of time to wait for an idle object when the pool
is exhausted and
-     * <i>whenExhaustedAction</i> is {@link #WHEN_EXHAUSTED_BLOCK} (otherwise
ignored) (see {@link #getMaxWait})
+     * <i>whenExhaustedAction</i> is {@link WhenExhaustedAction#BLOCK} (otherwise
ignored) (see {@link #getMaxWait})
      * @param maxIdle the maximum number of idle objects in my pool (see {@link #getMaxIdle})
      * @param testOnBorrow whether or not to validate objects before they are returned by
the {@link #borrowObject} method
      * (see {@link #getTestOnBorrow})
@@ -416,7 +416,7 @@ public class GenericObjectPool<T> extend
      * @param maxActive the maximum number of objects that can be borrowed at one time (see
{@link #setMaxActive})
      * @param whenExhaustedAction the action to take when the pool is exhausted (see {@link
#setWhenExhaustedAction})
      * @param maxWait the maximum amount of time to wait for an idle object when the pool
is exhausted and 
-     * <i>whenExhaustedAction</i> is {@link #WHEN_EXHAUSTED_BLOCK} (otherwise
ignored) (see {@link #setMaxWait})
+     * <i>whenExhaustedAction</i> is {@link WhenExhaustedAction#BLOCK} (otherwise
ignored) (see {@link #setMaxWait})
      * @param maxIdle the maximum number of idle objects in my pool (see {@link #setMaxIdle})
      * @param testOnBorrow whether or not to validate objects before they are returned by
the {@link #borrowObject}
      * method (see {@link #setTestOnBorrow})
@@ -444,7 +444,7 @@ public class GenericObjectPool<T> extend
      * @param maxActive the maximum number of objects that can be borrowed at one time (see
{@link #setMaxActive})
      * @param whenExhaustedAction the action to take when the pool is exhausted (see {@link
#setWhenExhaustedAction})
      * @param maxWait the maximum amount of time to wait for an idle object when the pool
is exhausted and
-     *  <i>whenExhaustedAction</i> is {@link #WHEN_EXHAUSTED_BLOCK} (otherwise
ignored) (see {@link #setMaxWait})
+     *  <i>whenExhaustedAction</i> is {@link WhenExhaustedAction#BLOCK} (otherwise
ignored) (see {@link #setMaxWait})
      * @param maxIdle the maximum number of idle objects in my pool (see {@link #setMaxIdle})
      * @param minIdle the minimum number of idle objects in my pool (see {@link #setMinIdle})
      * @param testOnBorrow whether or not to validate objects before they are returned by
the {@link #borrowObject} method
@@ -474,7 +474,7 @@ public class GenericObjectPool<T> extend
      * @param maxActive the maximum number of objects that can be borrowed at one time (see
{@link #setMaxActive})
      * @param whenExhaustedAction the action to take when the pool is exhausted (see {@link
#setWhenExhaustedAction})
      * @param maxWait the maximum amount of time to wait for an idle object when the pool
is exhausted and
-     * <i>whenExhaustedAction</i> is {@link #WHEN_EXHAUSTED_BLOCK} (otherwise
ignored) (see {@link #setMaxWait})
+     * <i>whenExhaustedAction</i> is {@link WhenExhaustedAction#BLOCK} (otherwise
ignored) (see {@link #setMaxWait})
      * @param maxIdle the maximum number of idle objects in my pool (see {@link #setMaxIdle})
      * @param minIdle the minimum number of idle objects in my pool (see {@link #setMinIdle})
      * @param testOnBorrow whether or not to validate objects before they are returned by
the {@link #borrowObject}
@@ -509,7 +509,7 @@ public class GenericObjectPool<T> extend
      * @param maxActive the maximum number of objects that can be borrowed at one time (see
{@link #setMaxActive})
      * @param whenExhaustedAction the action to take when the pool is exhausted (see {@link
#setWhenExhaustedAction})
      * @param maxWait the maximum amount of time to wait for an idle object when the pool
is exhausted and
-     * <i>whenExhaustedAction</i> is {@link #WHEN_EXHAUSTED_BLOCK} (otherwise
ignored) (see {@link #setMaxWait})
+     * <i>whenExhaustedAction</i> is {@link WhenExhaustedAction#BLOCK} (otherwise
ignored) (see {@link #setMaxWait})
      * @param maxIdle the maximum number of idle objects in my pool (see {@link #setMaxIdle})
      * @param minIdle the minimum number of idle objects in my pool (see {@link #setMinIdle})
      * @param testOnBorrow whether or not to validate objects before they are returned by
the {@link #borrowObject}
@@ -591,7 +591,7 @@ public class GenericObjectPool<T> extend
      * is invoked when the pool is exhausted (the maximum number
      * of "active" objects has been reached).
      *
-     * @return one of {@link #WHEN_EXHAUSTED_BLOCK}, {@link #WHEN_EXHAUSTED_FAIL} or {@link
#WHEN_EXHAUSTED_GROW}
+     * @return one of {@link WhenExhaustedAction#BLOCK}, {@link WhenExhaustedAction#FAIL}
or {@link WhenExhaustedAction#GROW}
      * @see #setWhenExhaustedAction
      */
     public synchronized WhenExhaustedAction getWhenExhaustedAction() {
@@ -604,8 +604,8 @@ public class GenericObjectPool<T> extend
      * of "active" objects has been reached).
      *
      * @param whenExhaustedAction the action code, which must be one of
-     *        {@link #WHEN_EXHAUSTED_BLOCK}, {@link #WHEN_EXHAUSTED_FAIL},
-     *        or {@link #WHEN_EXHAUSTED_GROW}
+     *        {@link WhenExhaustedAction#BLOCK}, {@link WhenExhaustedAction#FAIL},
+     *        or {@link WhenExhaustedAction#GROW}
      * @see #getWhenExhaustedAction
      */
     public synchronized void setWhenExhaustedAction(WhenExhaustedAction whenExhaustedAction)
{
@@ -619,7 +619,7 @@ public class GenericObjectPool<T> extend
      * {@link #borrowObject} method should block before throwing
      * an exception when the pool is exhausted and the
      * {@link #setWhenExhaustedAction "when exhausted" action} is
-     * {@link #WHEN_EXHAUSTED_BLOCK}.
+     * {@link WhenExhaustedAction#BLOCK}.
      *
      * When less than or equal to 0, the {@link #borrowObject} method
      * may block indefinitely.
@@ -627,7 +627,7 @@ public class GenericObjectPool<T> extend
      * @return maximum number of milliseconds to block when borrowing an object.
      * @see #setMaxWait
      * @see #setWhenExhaustedAction
-     * @see #WHEN_EXHAUSTED_BLOCK
+     * @see WhenExhaustedAction#BLOCK
      */
     public synchronized long getMaxWait() {
         return _maxWait;
@@ -638,7 +638,7 @@ public class GenericObjectPool<T> extend
      * {@link #borrowObject} method should block before throwing
      * an exception when the pool is exhausted and the
      * {@link #setWhenExhaustedAction "when exhausted" action} is
-     * {@link #WHEN_EXHAUSTED_BLOCK}.
+     * {@link WhenExhaustedAction#BLOCK}.
      *
      * When less than or equal to 0, the {@link #borrowObject} method
      * may block indefinitely.
@@ -646,7 +646,7 @@ public class GenericObjectPool<T> extend
      * @param maxWait maximum number of milliseconds to block when borrowing an object.
      * @see #getMaxWait
      * @see #setWhenExhaustedAction
-     * @see #WHEN_EXHAUSTED_BLOCK
+     * @see WhenExhaustedAction#BLOCK
      */
     public synchronized void setMaxWait(long maxWait) {
         _maxWait = maxWait;
@@ -977,8 +977,8 @@ public class GenericObjectPool<T> extend
      * instance is created, activated and (if applicable) validated and returned to the caller.</p>
      * 
      * <p>If the pool is exhausted (no available idle instances and no capacity to
create new ones),
-     * this method will either block ({@link #WHEN_EXHAUSTED_BLOCK}), throw a <code>NoSuchElementException</code>
-     * ({@link #WHEN_EXHAUSTED_FAIL}), or grow ({@link #WHEN_EXHAUSTED_GROW} - ignoring maxActive).
+     * this method will either block ({@link WhenExhaustedAction#BLOCK}), throw a <code>NoSuchElementException</code>
+     * ({@link WhenExhaustedAction#FAIL}), or grow ({@link WhenExhaustedAction#GROW} - ignoring
maxActive).
      * The length of time that this method will block when <code>whenExhaustedAction
== WHEN_EXHAUSTED_BLOCK</code>
      * is determined by the {@link #getMaxWait() maxWait} property.</p>
      * 
@@ -1839,14 +1839,14 @@ public class GenericObjectPool<T> extend
      * {@link #borrowObject} method should block before throwing
      * an exception when the pool is exhausted and the
      * {@link #getWhenExhaustedAction "when exhausted" action} is
-     * {@link #WHEN_EXHAUSTED_BLOCK}.
+     * {@link WhenExhaustedAction#BLOCK}.
      *
      * When less than or equal to 0, the {@link #borrowObject} method
      * may block indefinitely.
      *
      * @see #setMaxWait
      * @see #getMaxWait
-     * @see #WHEN_EXHAUSTED_BLOCK
+     * @see WhenExhaustedAction#BLOCK
      * @see #setWhenExhaustedAction
      * @see #getWhenExhaustedAction
      */
@@ -1857,10 +1857,10 @@ public class GenericObjectPool<T> extend
      * is invoked when the pool is exhausted (the maximum number
      * of "active" objects has been reached).
      *
-     * @see #WHEN_EXHAUSTED_ACTION.BLOCK
-     * @see #WHEN_EXHAUSTED_ACTION.FAIL
-     * @see #WHEN_EXHAUSTED_ACTION.GROW
-     * @see #DEFAULT_WHEN_EXHAUSTED_ACTION
+     * @see WHEN_EXHAUSTED_ACTION#BLOCK
+     * @see WHEN_EXHAUSTED_ACTION#FAIL
+     * @see WHEN_EXHAUSTED_ACTION#GROW
+     * @see DEFAULT_WHEN_EXHAUSTED_ACTION
      * @see #setWhenExhaustedAction
      * @see #getWhenExhaustedAction
      */

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPoolFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPoolFactory.java?rev=1021856&r1=1021855&r2=1021856&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPoolFactory.java
(original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPoolFactory.java
Tue Oct 12 17:45:07 2010
@@ -72,7 +72,7 @@ public class GenericObjectPoolFactory<T>
      * @param maxActive maximum number of objects that can be borrowed from created pools
at one time.
      * @param whenExhaustedAction the action to take when the pool is exhausted.
      * @param maxWait the maximum amount of time to wait for an idle object when the pool
is exhausted.
-     * @see GenericObjectPool#GenericObjectPool(PoolableObjectFactory, int, byte, long)
+     * @see GenericObjectPool#GenericObjectPool(PoolableObjectFactory, int, WhenExhaustedAction,
long)
      */
     public GenericObjectPoolFactory(PoolableObjectFactory<T> factory, int maxActive,
WhenExhaustedAction whenExhaustedAction, long maxWait) {
         this(factory,maxActive,whenExhaustedAction,maxWait,GenericObjectPool.DEFAULT_MAX_IDLE,GenericObjectPool.DEFAULT_MIN_IDLE,GenericObjectPool.DEFAULT_TEST_ON_BORROW,GenericObjectPool.DEFAULT_TEST_ON_RETURN,GenericObjectPool.DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS,GenericObjectPool.DEFAULT_NUM_TESTS_PER_EVICTION_RUN,GenericObjectPool.DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS,GenericObjectPool.DEFAULT_TEST_WHILE_IDLE);
@@ -87,7 +87,7 @@ public class GenericObjectPoolFactory<T>
      * @param maxWait the maximum amount of time to wait for an idle object when the pool
is exhausted.
      * @param testOnBorrow whether to validate objects before they are returned by the borrowObject.
      * @param testOnReturn whether to validate objects after they are returned to the returnObject.
-     * @see GenericObjectPool#GenericObjectPool(PoolableObjectFactory, int, byte, long, boolean,
boolean)
+     * @see GenericObjectPool#GenericObjectPool(PoolableObjectFactory, int, WhenExhaustedAction,
long, boolean, boolean)
      */
     public GenericObjectPoolFactory(PoolableObjectFactory<T> factory, int maxActive,
WhenExhaustedAction whenExhaustedAction, long maxWait, boolean testOnBorrow, boolean testOnReturn)
{
         this(factory,maxActive,whenExhaustedAction,maxWait,GenericObjectPool.DEFAULT_MAX_IDLE,GenericObjectPool.DEFAULT_MIN_IDLE,testOnBorrow,testOnReturn,GenericObjectPool.DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS,GenericObjectPool.DEFAULT_NUM_TESTS_PER_EVICTION_RUN,GenericObjectPool.DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS,GenericObjectPool.DEFAULT_TEST_WHILE_IDLE);
@@ -101,7 +101,7 @@ public class GenericObjectPoolFactory<T>
      * @param whenExhaustedAction the action to take when the pool is exhausted.
      * @param maxWait the maximum amount of time to wait for an idle object when the pool
is exhausted.
      * @param maxIdle the maximum number of idle objects in my pool.
-     * @see GenericObjectPool#GenericObjectPool(PoolableObjectFactory, int, byte, long, int)
+     * @see GenericObjectPool#GenericObjectPool(PoolableObjectFactory, int, WhenExhaustedAction,
long, int)
      */
     public GenericObjectPoolFactory(PoolableObjectFactory<T> factory, int maxActive,
WhenExhaustedAction whenExhaustedAction, long maxWait, int maxIdle) {
         this(factory,maxActive,whenExhaustedAction,maxWait,maxIdle,GenericObjectPool.DEFAULT_MIN_IDLE,GenericObjectPool.DEFAULT_TEST_ON_BORROW,GenericObjectPool.DEFAULT_TEST_ON_RETURN,GenericObjectPool.DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS,GenericObjectPool.DEFAULT_NUM_TESTS_PER_EVICTION_RUN,GenericObjectPool.DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS,GenericObjectPool.DEFAULT_TEST_WHILE_IDLE);
@@ -117,7 +117,7 @@ public class GenericObjectPoolFactory<T>
      * @param maxIdle the maximum number of idle objects in my pool.
      * @param testOnBorrow whether to validate objects before they are returned by the borrowObject.
      * @param testOnReturn whether to validate objects after they are returned to the returnObject.
-     * @see GenericObjectPool#GenericObjectPool(PoolableObjectFactory, int, byte, long, int,
boolean, boolean)
+     * @see GenericObjectPool#GenericObjectPool(PoolableObjectFactory, int, WhenExhaustedAction,
long, int, boolean, boolean)
      */
     public GenericObjectPoolFactory(PoolableObjectFactory<T> factory, int maxActive,
WhenExhaustedAction whenExhaustedAction, long maxWait, int maxIdle, boolean testOnBorrow,
boolean testOnReturn) {
         this(factory,maxActive,whenExhaustedAction,maxWait,maxIdle,GenericObjectPool.DEFAULT_MIN_IDLE,testOnBorrow,testOnReturn,GenericObjectPool.DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS,GenericObjectPool.DEFAULT_NUM_TESTS_PER_EVICTION_RUN,GenericObjectPool.DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS,GenericObjectPool.DEFAULT_TEST_WHILE_IDLE);
@@ -137,7 +137,7 @@ public class GenericObjectPoolFactory<T>
      * @param numTestsPerEvictionRun the number of idle objects to examine per run within
the idle object eviction thread.
      * @param minEvictableIdleTimeMillis the minimum number of milliseconds an object can
sit idle in the pool before it is eligible for eviction.
      * @param testWhileIdle whether or not to validate objects in the idle object eviction
thread.
-     * @see GenericObjectPool#GenericObjectPool(PoolableObjectFactory, int, byte, long, int,
boolean, boolean, long, int, long, boolean)
+     * @see GenericObjectPool#GenericObjectPool(PoolableObjectFactory, int, WhenExhaustedAction,
long, int, boolean, boolean, long, int, long, boolean)
      */
     public GenericObjectPoolFactory(PoolableObjectFactory<T> factory, int maxActive,
WhenExhaustedAction whenExhaustedAction, long maxWait, int maxIdle, boolean testOnBorrow,
boolean testOnReturn, long timeBetweenEvictionRunsMillis, int numTestsPerEvictionRun, long
minEvictableIdleTimeMillis, boolean testWhileIdle) {
         this(factory,maxActive,whenExhaustedAction,maxWait,maxIdle,GenericObjectPool.DEFAULT_MIN_IDLE,testOnBorrow,testOnReturn,timeBetweenEvictionRunsMillis,numTestsPerEvictionRun,minEvictableIdleTimeMillis,testWhileIdle,
GenericObjectPool.DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME_MILLIS);
@@ -158,7 +158,7 @@ public class GenericObjectPoolFactory<T>
      * @param numTestsPerEvictionRun the number of idle objects to examine per run within
the idle object eviction thread.
      * @param minEvictableIdleTimeMillis the minimum number of milliseconds an object can
sit idle in the pool before it is eligible for eviction.
      * @param testWhileIdle whether or not to validate objects in the idle object eviction
thread.
-     * @see GenericObjectPool#GenericObjectPool(PoolableObjectFactory, int, byte, long, int,
int, boolean, boolean, long, int, long, boolean)
+     * @see GenericObjectPool#GenericObjectPool(PoolableObjectFactory, int, WhenExhaustedAction,
long, int, int, boolean, boolean, long, int, long, boolean)
      */
     public GenericObjectPoolFactory(PoolableObjectFactory<T> factory, int maxActive,
WhenExhaustedAction whenExhaustedAction, long maxWait, int maxIdle, int minIdle, boolean testOnBorrow,
boolean testOnReturn, long timeBetweenEvictionRunsMillis, int numTestsPerEvictionRun, long
minEvictableIdleTimeMillis, boolean testWhileIdle) {
         this(factory,maxActive,whenExhaustedAction,maxWait,maxIdle,minIdle,testOnBorrow,testOnReturn,timeBetweenEvictionRunsMillis,numTestsPerEvictionRun,minEvictableIdleTimeMillis,testWhileIdle,
GenericObjectPool.DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME_MILLIS);
@@ -181,7 +181,7 @@ public class GenericObjectPoolFactory<T>
      * @param testWhileIdle whether or not to validate objects in the idle object eviction
thread.
      * @param softMinEvictableIdleTimeMillis the minimum number of milliseconds an object
can sit idle in the pool before it is eligible for eviction with the extra condition that
at least "minIdle" amount of object remain in the pool.
      * @since Pool 1.3
-     * @see GenericObjectPool#GenericObjectPool(PoolableObjectFactory, int, byte, long, int,
int, boolean, boolean, long, int, long, boolean, long)
+     * @see GenericObjectPool#GenericObjectPool(PoolableObjectFactory, int, WhenExhaustedAction,
long, int, int, boolean, boolean, long, int, long, boolean, long)
      */
     public GenericObjectPoolFactory(PoolableObjectFactory<T> factory, int maxActive,
WhenExhaustedAction whenExhaustedAction, long maxWait, int maxIdle, int minIdle, boolean testOnBorrow,
boolean testOnReturn, long timeBetweenEvictionRunsMillis, int numTestsPerEvictionRun, long
minEvictableIdleTimeMillis, boolean testWhileIdle, long softMinEvictableIdleTimeMillis) {
         this(factory,maxActive,whenExhaustedAction,maxWait,maxIdle,minIdle,testOnBorrow,testOnReturn,timeBetweenEvictionRunsMillis,numTestsPerEvictionRun,minEvictableIdleTimeMillis,testWhileIdle,softMinEvictableIdleTimeMillis,
GenericObjectPool.DEFAULT_LIFO);
@@ -205,7 +205,7 @@ public class GenericObjectPoolFactory<T>
      * @param softMinEvictableIdleTimeMillis the minimum number of milliseconds an object
can sit idle in the pool before it is eligible for eviction with the extra condition that
at least "minIdle" amount of object remain in the pool.
      * @param lifo whether or not objects are returned in last-in-first-out order from the
idle object pool.
      * @since Pool 1.4
-     * @see GenericObjectPool#GenericObjectPool(PoolableObjectFactory, int, byte, long, int,
int, boolean, boolean, long, int, long, boolean, long, boolean)
+     * @see GenericObjectPool#GenericObjectPool(PoolableObjectFactory, int, WhenExhaustedAction,
long, int, int, boolean, boolean, long, int, long, boolean, long, boolean)
      */
     public GenericObjectPoolFactory(PoolableObjectFactory<T> factory, int maxActive,
WhenExhaustedAction whenExhaustedAction, long maxWait, int maxIdle, int minIdle, boolean testOnBorrow,
boolean testOnReturn, long timeBetweenEvictionRunsMillis, int numTestsPerEvictionRun, long
minEvictableIdleTimeMillis, boolean testWhileIdle, long softMinEvictableIdleTimeMillis, boolean
lifo) {
         _maxIdle = maxIdle;



Mime
View raw message