Author: markt Date: Tue Oct 15 10:38:12 2013 New Revision: 1532278 URL: http://svn.apache.org/r1532278 Log: Fix some more checkstyle warnings
Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/PooledObject.java commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/SwallowedExceptionListener.java commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/UsageTracking.java Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/PooledObject.java URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/PooledObject.java?rev=1532278&r1=1532277&r2=1532278&view=diff ============================================================================== --- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/PooledObject.java (original) +++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/PooledObject.java Tue Oct 15 10:38:12 2013 @@ -119,8 +119,24 @@ public interface PooledObject<T> extends @Override String toString(); + /** + * Attempt to place the pooled object in the + * {@link PooledObjectState#EVICTION} state. + * + * @return <code>true</code> if the object was placed in the + * {@link PooledObjectState#EVICTION} state otherwise + * <code>false</code> + */ boolean startEvictionTest(); + /** + * Called to inform the object that the eviction test has ended. + * + * @param idleQueue The queue if idle objects to which the object should be + * returned + * + * @return Currently not used + */ boolean endEvictionTest(Deque<PooledObject<T>> idleQueue); /** @@ -147,6 +163,9 @@ public interface PooledObject<T> extends * Is abandoned object tracking being used? If this is true the * implementation will need to record the stack trace of the last caller to * borrow this object. + * + * @param logAbandoned The new configuration setting for abandoned + * object tracking */ void setLogAbandoned(boolean logAbandoned); @@ -159,6 +178,8 @@ public interface PooledObject<T> extends * Prints the stack trace of the code that borrowed this pooled object and * the stack trace of the last code to use this object (if available) to * the supplied writer. + * + * @param writer The destination for the debug output */ void printStackTrace(PrintWriter writer); Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/SwallowedExceptionListener.java URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/SwallowedExceptionListener.java?rev=1532278&r1=1532277&r2=1532278&view=diff ============================================================================== --- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/SwallowedExceptionListener.java (original) +++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/SwallowedExceptionListener.java Tue Oct 15 10:38:12 2013 @@ -26,5 +26,11 @@ package org.apache.commons.pool2; */ public interface SwallowedExceptionListener { + /** + * This method is called every time the implementation unavoidably swallows + * an exception. + * + * @param e The exception that was swallowed + */ void onSwallowException(Exception e); } Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/UsageTracking.java URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/UsageTracking.java?rev=1532278&r1=1532277&r2=1532278&view=diff ============================================================================== --- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/UsageTracking.java (original) +++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/UsageTracking.java Tue Oct 15 10:38:12 2013 @@ -23,10 +23,17 @@ package org.apache.commons.pool2; * using allowing more informed decisions and reporting to be made regarding * abandoned objects. * - * @version $Revision:$ + * @param <T> The type of object provided by the pool. * * @since 2.0 */ public interface UsageTracking<T> { + + /** + * This method is called every time a pooled object to enable the pool to + * better track borrowed objects. + * + * @param pooledObject The object that is being used + */ void use(T pooledObject); }