commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1135155 - /commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPoolConfig.java
Date Mon, 13 Jun 2011 16:08:56 GMT
Author: markt
Date: Mon Jun 13 16:08:56 2011
New Revision: 1135155

URL: http://svn.apache.org/viewvc?rev=1135155&view=rev
Log:
Need maxTotal here too (but with a different default and slightly different definition)

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

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPoolConfig.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPoolConfig.java?rev=1135155&r1=1135154&r2=1135155&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPoolConfig.java
(original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPoolConfig.java
Mon Jun 13 16:08:56 2011
@@ -31,12 +31,20 @@ public class GenericObjectPoolConfig ext
      */
     public static final long DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME_MILLIS = -1;
 
-    
+    /**
+     * The default maximum number of instances under management
+     * (idle or checked out).
+     */
+    public static final int DEFAULT_MAX_TOTAL = 8;
+
+
     private PoolableObjectFactory<?> factory = null;
 
     private long softMinEvictableIdleTimeMillis =
         DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS;
 
+    private int maxTotal = DEFAULT_MAX_TOTAL;
+
 
     public PoolableObjectFactory<?> getFactory() {
         return factory;
@@ -45,7 +53,8 @@ public class GenericObjectPoolConfig ext
     public void setFactory(PoolableObjectFactory<?> factory) {
         this.factory = factory;
     }
-    
+
+
     public long getSoftMinEvictableIdleTimeMillis() {
         return softMinEvictableIdleTimeMillis;
     }
@@ -54,4 +63,13 @@ public class GenericObjectPoolConfig ext
             long softMinEvictableIdleTimeMillis) {
         this.softMinEvictableIdleTimeMillis = softMinEvictableIdleTimeMillis;
     }
+
+
+    public int getMaxTotal() {
+        return maxTotal;
+    }
+
+    public void setMaxTotal(int maxTotal) {
+        this.maxTotal = maxTotal;
+    }
 }



Mime
View raw message