You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2015/09/03 20:36:33 UTC

svn commit: r1701100 - /commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/EvictionConfig.java

Author: ggregory
Date: Thu Sep  3 18:36:33 2015
New Revision: 1701100

URL: http://svn.apache.org/r1701100
Log:
[POOL-302] Add toString() methods to faciliate debugging and logging.

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

Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/EvictionConfig.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/EvictionConfig.java?rev=1701100&r1=1701099&r2=1701100&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/EvictionConfig.java (original)
+++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/EvictionConfig.java Thu Sep  3 18:36:33 2015
@@ -33,7 +33,6 @@ public class EvictionConfig {
     private final long idleSoftEvictTime;
     private final int minIdle;
 
-
     /**
      * Create a new eviction configuration with the specified parameters.
      * Instances are immutable.
@@ -98,4 +97,20 @@ public class EvictionConfig {
     public int getMinIdle() {
         return minIdle;
     }
+
+    /**
+     * @since 2.4
+     */
+    @Override
+    public String toString() {
+        StringBuilder builder = new StringBuilder();
+        builder.append("EvictionConfig [idleEvictTime=");
+        builder.append(idleEvictTime);
+        builder.append(", idleSoftEvictTime=");
+        builder.append(idleSoftEvictTime);
+        builder.append(", minIdle=");
+        builder.append(minIdle);
+        builder.append("]");
+        return builder.toString();
+    }
 }