commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1701100 - /commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/EvictionConfig.java
Date Thu, 03 Sep 2015 18:36:33 GMT
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();
+    }
 }



Mime
View raw message