Author: rdonkin
Date: Sat Feb 18 11:22:21 2006
New Revision: 378762

URL: http://svn.apache.org/viewcvs?rev=378762&view=rev
Log:
Updates to javadoc contracts for 2.0. Contributed by Sandy McArthur. 
Issue#38664..

Modified:
    
jakarta/commons/proper/pool/trunk/src/java/org/apache/commons/pool/KeyedPoolableObjectFactory.java
    
jakarta/commons/proper/pool/trunk/src/java/org/apache/commons/pool/PoolableObjectFactory.java

Modified: 
jakarta/commons/proper/pool/trunk/src/java/org/apache/commons/pool/KeyedPoolableObjectFactory.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/pool/trunk/src/java/org/apache/commons/pool/KeyedPoolableObjectFactory.java?rev=378762&r1=378761&r2=378762&view=diff
==============================================================================
--- 
jakarta/commons/proper/pool/trunk/src/java/org/apache/commons/pool/KeyedPoolableObjectFactory.java
 (original)
+++ 
jakarta/commons/proper/pool/trunk/src/java/org/apache/commons/pool/KeyedPoolableObjectFactory.java
 Sat Feb 18 11:22:21 2006
@@ -18,41 +18,49 @@
 
 /**
  * An interface defining life-cycle methods for
- * instances to be served by a
- * [EMAIL PROTECTED] KeyedObjectPool KeyedObjectPool}.
+ * instances to be served by a [EMAIL PROTECTED] KeyedObjectPool}.
  * <p>
- * By contract, when an [EMAIL PROTECTED] KeyedObjectPool KeyedObjectPool}
- * delegates to a <tt>KeyedPoolableObjectFactory</tt>,
+ * By contract, when an [EMAIL PROTECTED] KeyedObjectPool}
+ * delegates to a [EMAIL PROTECTED] KeyedPoolableObjectFactory},
  * <ol>
  *  <li>
- *   [EMAIL PROTECTED] #makeObject makeObject} 
- *   is called  whenever a new instance is needed.
+ *   [EMAIL PROTECTED] #makeObject}
+ *   is called whenever a new instance is needed.
  *  </li>
  *  <li>
- *   [EMAIL PROTECTED] #activateObject activateObject} 
- *   is invoked on every instance before it is returned from the
- *   pool.
+ *   [EMAIL PROTECTED] #activateObject}
+ *   is invoked on every instance that has been
+ *   [EMAIL PROTECTED] #passivateObject passivated} before it is
+ *   [EMAIL PROTECTED] KeyedObjectPool#borrowObject borrowed} from the pool.
  *  </li>
  *  <li>
- *   [EMAIL PROTECTED] #passivateObject passivateObject} 
- *   is invoked on every instance when it is returned to the
- *   pool.
+ *   [EMAIL PROTECTED] #validateObject}
+ *   is invoked on [EMAIL PROTECTED] #activateObject activated} instances to 
make sure
+ *   they can be [EMAIL PROTECTED] KeyedObjectPool#borrowObject borrowed} from 
the pool.
+ *   [EMAIL PROTECTED] #validateObject} <strong>may</strong> also be used to 
test an
+ *   instance being [EMAIL PROTECTED] KeyedObjectPool#returnObject returned} 
to the pool
+ *   before it is [EMAIL PROTECTED] #passivateObject passivated}. It will only 
be invoked
+ *   on an [EMAIL PROTECTED] #activateObject activated} instance.
  *  </li>
  *  <li>
- *   [EMAIL PROTECTED] #destroyObject destroyObject} 
- *   is invoked on every instance when it is being "dropped" from the
- *   pool (whether due to the response from
- *   [EMAIL PROTECTED] #validateObject validateObject}, or
- *   for reasons specific to the pool implementation.)
+ *   [EMAIL PROTECTED] #passivateObject}
+ *   is invoked on every instance when it is returned to the pool.
  *  </li>
  *  <li>
- *   [EMAIL PROTECTED] #validateObject validateObject} 
- *   is invoked in an implementation-specific fashion to determine if an 
instance
- *   is still valid to be returned by the pool.
- *   It will only be invoked on an [EMAIL PROTECTED] #activateObject 
"activated"}
- *   instance.
+ *   [EMAIL PROTECTED] #destroyObject}
+ *   is invoked on every instance when it is being "dropped" from the
+ *   pool (whether due to the response from [EMAIL PROTECTED] #validateObject},
+ *   or for reasons specific to the pool implementation.) There is no
+ *   guarantee that the instance being [EMAIL PROTECTED] #destroyObject 
destroyed} will
+ *   be considered active or passive.
  *  </li>
  * </ol>
+ *
+ * <p>
+ * [EMAIL PROTECTED] KeyedPoolableObjectFactory} must be thread-safe. The only 
promise
+ * an [EMAIL PROTECTED] KeyedObjectPool} makes is that the same instance of an 
object will not
+ * be passed to more than one method of a [EMAIL PROTECTED] 
KeyedPoolableObjectFactory}
+ * at a time.
  *
  * @see KeyedObjectPool
  * 

Modified: 
jakarta/commons/proper/pool/trunk/src/java/org/apache/commons/pool/PoolableObjectFactory.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/pool/trunk/src/java/org/apache/commons/pool/PoolableObjectFactory.java?rev=378762&r1=378761&r2=378762&view=diff
==============================================================================
--- 
jakarta/commons/proper/pool/trunk/src/java/org/apache/commons/pool/PoolableObjectFactory.java
 (original)
+++ 
jakarta/commons/proper/pool/trunk/src/java/org/apache/commons/pool/PoolableObjectFactory.java
 Sat Feb 18 11:22:21 2006
@@ -18,41 +18,49 @@
 
 /**
  * An interface defining life-cycle methods for
- * instances to be used in an
- * [EMAIL PROTECTED] ObjectPool ObjectPool}.
+ * instances to be served by an [EMAIL PROTECTED] ObjectPool}.
  * <p>
- * By contract, when an [EMAIL PROTECTED] ObjectPool ObjectPool}
- * delegates to a <tt>PoolableObjectFactory</tt>,
+ * By contract, when an [EMAIL PROTECTED] ObjectPool}
+ * delegates to a [EMAIL PROTECTED] PoolableObjectFactory},
  * <ol>
  *  <li>
- *   [EMAIL PROTECTED] #makeObject makeObject} 
- *   is called  whenever a new instance is needed.
+ *   [EMAIL PROTECTED] #makeObject}
+ *   is called whenever a new instance is needed.
  *  </li>
  *  <li>
- *   [EMAIL PROTECTED] #activateObject activateObject} 
- *   is invoked on every instance before it is returned from the
- *   pool.
+ *   [EMAIL PROTECTED] #activateObject}
+ *   is invoked on every instance that has been
+ *   [EMAIL PROTECTED] #passivateObject passivated} before it is
+ *   [EMAIL PROTECTED] ObjectPool#borrowObject borrowed} from the pool.
  *  </li>
  *  <li>
- *   [EMAIL PROTECTED] #passivateObject passivateObject} 
- *   is invoked on every instance when it is returned to the
- *   pool.
+ *   [EMAIL PROTECTED] #validateObject}
+ *   is invoked on [EMAIL PROTECTED] #activateObject activated} instances to 
make sure
+ *   they can be [EMAIL PROTECTED] ObjectPool#borrowObject borrowed} from the 
pool.
+ *   [EMAIL PROTECTED] #validateObject} <strong>may</strong> also be used to 
test an
+ *   instance being [EMAIL PROTECTED] ObjectPool#returnObject returned} to the 
pool
+ *   before it is [EMAIL PROTECTED] #passivateObject passivated}. It will only 
be invoked
+ *   on an [EMAIL PROTECTED] #activateObject activated} instance.
  *  </li>
  *  <li>
- *   [EMAIL PROTECTED] #destroyObject destroyObject} 
- *   is invoked on every instance when it is being "dropped" from the
- *   pool (whether due to the response from
- *   [EMAIL PROTECTED] #validateObject validateObject}, or
- *   for reasons specific to the pool implementation.)
+ *   [EMAIL PROTECTED] #passivateObject}
+ *   is invoked on every instance when it is returned to the pool.
  *  </li>
  *  <li>
- *   [EMAIL PROTECTED] #validateObject validateObject} 
- *   is invoked in an implementation-specific fashion to determine if an 
instance
- *   is still valid to be returned by the pool.
- *   It will only be invoked on an [EMAIL PROTECTED] #activateObject 
"activated"}
- *   instance.
+ *   [EMAIL PROTECTED] #destroyObject}
+ *   is invoked on every instance when it is being "dropped" from the
+ *   pool (whether due to the response from [EMAIL PROTECTED] #validateObject},
+ *   or for reasons specific to the pool implementation.) There is no
+ *   guarantee that the instance being [EMAIL PROTECTED] #destroyObject 
destroyed} will
+ *   be considered active or passive.
  *  </li>
  * </ol>
+ *
+ * <p>
+ * [EMAIL PROTECTED] PoolableObjectFactory} must be thread-safe. The only 
promise
+ * an [EMAIL PROTECTED] ObjectPool} makes is that the same instance of an 
object will not
+ * be passed to more than one method of a [EMAIL PROTECTED] 
PoolableObjectFactory}
+ * at a time.
  *
  * @see ObjectPool
  *



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to