commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1329266 - /commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/EvictionPolicy.java
Date Mon, 23 Apr 2012 14:54:22 GMT
Author: markt
Date: Mon Apr 23 14:54:22 2012
New Revision: 1329266

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

Modified:
    commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/EvictionPolicy.java

Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/EvictionPolicy.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/EvictionPolicy.java?rev=1329266&r1=1329265&r2=1329266&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/EvictionPolicy.java
(original)
+++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/EvictionPolicy.java
Mon Apr 23 14:54:22 2012
@@ -16,7 +16,24 @@
  */
 package org.apache.commons.pool2.impl;
 
+/**
+ * To provide a custom eviction policy (i.e. something other than {@link
+ * DefaultEvictionPolicy} for a pool, users must provide an implementation of
+ * this interface that provides the required eviction policy.
+ */
 public interface EvictionPolicy<T> {
+    
+    /**
+     * This method is called to test if an idle object in the pool should be
+     * evicted or not.
+     * 
+     * @param config    The pool configuration settings related to eviction
+     * @param underTest The pooled object being tested for eviction
+     * @param idleCount The current number of idle objects in the pool including
+     *                      the object under test
+     * @return <code>true</code> if the object should be evicted, otherwise
+     *             <code>false</code>
+     */
     boolean evict(EvictionConfig config, PooledObject<T> underTest,
             int idleCount);
 }



Mime
View raw message