commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject svn commit: r1136167 - /commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/pool/PoolSoak.java
Date Wed, 15 Jun 2011 20:08:40 GMT
Author: psteitz
Date: Wed Jun 15 20:08:40 2011
New Revision: 1136167

URL: http://svn.apache.org/viewvc?rev=1136167&view=rev
Log:
Updated to reflect pool2 API changes.

Modified:
    commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/pool/PoolSoak.java

Modified: commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/pool/PoolSoak.java
URL: http://svn.apache.org/viewvc/commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/pool/PoolSoak.java?rev=1136167&r1=1136166&r2=1136167&view=diff
==============================================================================
--- commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/pool/PoolSoak.java
(original)
+++ commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/pool/PoolSoak.java
Wed Jun 15 20:08:40 2011
@@ -170,8 +170,9 @@ public class PoolSoak extends LoadGenera
             genericObjectPool.setTestWhileIdle(testWhileIdle);
             genericObjectPool.setLifo(lifo);
         } else if (poolType.equals("GenericObjectPool2")) {
-            genericObjectPool2 = new org.apache.commons.pool2.impl.GenericObjectPool<Waiter>(factory2);
-            genericObjectPool2.setMaxActive(maxActive);
+            genericObjectPool2 = new org.apache.commons.pool2.impl.GenericObjectPool<Waiter>();
+            genericObjectPool2.setFactory(factory2);
+            genericObjectPool2.setMaxTotal(maxActive);
             genericObjectPool2.setWhenExhaustedAction(mapExhaustedAction(exhaustedAction));
             genericObjectPool2.setMaxWait(maxWait);
             genericObjectPool2.setMaxIdle(maxIdle);
@@ -217,13 +218,14 @@ public class PoolSoak extends LoadGenera
             genericKeyedObjectPool.setLifo(lifo);
         } else if (poolType.equals("GenericKeyedObjectPool2")) {
             genericKeyedObjectPool2 = 
-                new org.apache.commons.pool2.impl.GenericKeyedObjectPool<Integer, Waiter>(factory2);
-            genericKeyedObjectPool2.setMaxActive(maxActivePerKey);
+                new org.apache.commons.pool2.impl.GenericKeyedObjectPool<Integer, Waiter>();
+            genericKeyedObjectPool2.setFactory(factory2);
+            genericKeyedObjectPool2.setMaxTotalPerKey(maxActivePerKey);
             genericKeyedObjectPool2.setMaxTotal(maxActive);
             genericKeyedObjectPool2.setWhenExhaustedAction(mapExhaustedAction(exhaustedAction));
             genericKeyedObjectPool2.setMaxWait(maxWait);
-            genericKeyedObjectPool2.setMaxIdle(maxIdle);
-            genericKeyedObjectPool2.setMinIdle(minIdle);
+            genericKeyedObjectPool2.setMaxIdlePerKey(maxIdle);
+            genericKeyedObjectPool2.setMinIdlePerKey(minIdle);
             genericKeyedObjectPool2.setTestOnBorrow(testOnBorrow);
             genericKeyedObjectPool2.setTestOnReturn(testOnReturn);
             genericKeyedObjectPool2.setTimeBetweenEvictionRunsMillis(



Mime
View raw message