commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject svn commit: r791364 - in /commons/proper/pool/trunk/src/java/org/apache/commons/pool: BaseObjectPool.java impl/GenericKeyedObjectPool.java
Date Mon, 06 Jul 2009 01:52:28 GMT
Author: psteitz
Date: Mon Jul  6 01:52:27 2009
New Revision: 791364

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

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

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool/BaseObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool/BaseObjectPool.java?rev=791364&r1=791363&r2=791364&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool/BaseObjectPool.java (original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool/BaseObjectPool.java Mon Jul
 6 01:52:27 2009
@@ -112,6 +112,7 @@
      * Always throws an {@link UnsupportedOperationException},
      * subclasses should override this behavior.
      * 
+     * @param factory the PoolableObjectFactory
      * @throws UnsupportedOperationException
      * @throws IllegalStateException
      */

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=791364&r1=791363&r2=791364&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
Mon Jul  6 01:52:27 2009
@@ -923,10 +923,12 @@
      * When a negative value is supplied, 
      * <code>ceil({@link #getNumIdle()})/abs({@link #getNumTestsPerEvictionRun})</code>
      * tests will be run.  I.e., when the value is <code>-n</code>, roughly one
<code>n</code>th of the
-     * idle objects will be tested per run.
+     * idle objects will be tested per run.  When the value is positive, the number of tests
+     * actually performed in each run will be the minimum of this value and the number of
instances
+     * idle in the pools.
      *
      * @param numTestsPerEvictionRun number of objects to examine each eviction run.
-     * @see #getNumTestsPerEvictionRun
+     * @see #setNumTestsPerEvictionRun
      * @see #setTimeBetweenEvictionRunsMillis
      */
     public synchronized void setNumTestsPerEvictionRun(int numTestsPerEvictionRun) {
@@ -2049,6 +2051,12 @@
         }
     }
 
+    /**
+     * Returns pool info including {@link #getNumActive()}, {@link #getNumIdle()}
+     * and currently defined keys.
+     * 
+     * @return string containing debug information
+     */
     synchronized String debugInfo() {
         StringBuffer buf = new StringBuffer();
         buf.append("Active: ").append(getNumActive()).append("\n");
@@ -2060,6 +2068,14 @@
         return buf.toString();
     }
 
+    /** 
+     * Returns the number of tests to be performed in an Evictor run,
+     * based on the current values of <code>_numTestsPerEvictionRun</code>
+     * and _totalIdle.
+     * 
+     * @see #setNumTestsPerEvictionRun
+     * @return the number of tests for the Evictor to run
+     */
     private synchronized int getNumTests() {
         if (_numTestsPerEvictionRun >= 0) {
             return Math.min(_numTestsPerEvictionRun, _totalIdle);
@@ -2231,6 +2247,10 @@
      * @see GenericKeyedObjectPool#setTimeBetweenEvictionRunsMillis
      */
     private class Evictor extends TimerTask {
+        /**
+         * Run pool maintenance.  Evict objects qualifying for eviction and then
+         * invoke {@link GenericKeyedObjectPool#ensureMinIdle()}.
+         */
         public void run() {
             //Evict from the pool
             try {



Mime
View raw message