commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1564430 - /commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
Date Tue, 04 Feb 2014 19:21:57 GMT
Author: markt
Date: Tue Feb  4 19:21:57 2014
New Revision: 1564430

URL: http://svn.apache.org/r1564430
Log:
Sync with Pool 2

Modified:
    commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java

Modified: commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java?rev=1564430&r1=1564429&r2=1564430&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
(original)
+++ commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
Tue Feb  4 19:21:57 2014
@@ -41,6 +41,7 @@ import org.apache.commons.dbcp2.Poolable
 import org.apache.commons.pool2.KeyedObjectPool;
 import org.apache.commons.pool2.impl.GenericKeyedObjectPool;
 import org.apache.commons.pool2.impl.GenericKeyedObjectPoolConfig;
+import org.apache.commons.pool2.impl.GenericObjectPoolConfig;
 
 /**
  * <p>
@@ -119,7 +120,8 @@ public class DriverAdapterCPDS
     // PreparedStatement pool properties
     private boolean poolPreparedStatements;
     private int maxIdle = 10;
-    private int _timeBetweenEvictionRunsMillis = -1;
+    private long _timeBetweenEvictionRunsMillis =
+            GenericObjectPoolConfig.DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS;
     private int _numTestsPerEvictionRun = -1;
     private int _minEvictableIdleTimeMillis = -1;
     private int _maxPreparedStatements = -1;
@@ -585,9 +587,9 @@ public class DriverAdapterCPDS
      * When non-positive, no idle object evictor thread will be
      * run.
      * @return the value of the evictor thread timer
-     * @see #setTimeBetweenEvictionRunsMillis(int)
+     * @see #setTimeBetweenEvictionRunsMillis(long)
      */
-    public int getTimeBetweenEvictionRunsMillis() {
+    public long getTimeBetweenEvictionRunsMillis() {
         return _timeBetweenEvictionRunsMillis;
     }
 
@@ -601,7 +603,7 @@ public class DriverAdapterCPDS
      * @throws IllegalStateException if {@link #getPooledConnection()} has been called
      */
     public void setTimeBetweenEvictionRunsMillis(
-            int timeBetweenEvictionRunsMillis) {
+            long timeBetweenEvictionRunsMillis) {
         assertInitializationAllowed();
         _timeBetweenEvictionRunsMillis = timeBetweenEvictionRunsMillis;
     }
@@ -627,7 +629,7 @@ public class DriverAdapterCPDS
      *
      * @param numTestsPerEvictionRun number of statements to examine per run
      * @see #getNumTestsPerEvictionRun()
-     * @see #setTimeBetweenEvictionRunsMillis(int)
+     * @see #setTimeBetweenEvictionRunsMillis(long)
      * @throws IllegalStateException if {@link #getPooledConnection()} has been called
      */
     public void setNumTestsPerEvictionRun(int numTestsPerEvictionRun) {
@@ -655,7 +657,7 @@ public class DriverAdapterCPDS
      * due to idle time alone.
      * @param minEvictableIdleTimeMillis minimum time to set (in ms)
      * @see #getMinEvictableIdleTimeMillis()
-     * @see #setTimeBetweenEvictionRunsMillis(int)
+     * @see #setTimeBetweenEvictionRunsMillis(long)
      * @throws IllegalStateException if {@link #getPooledConnection()} has been called
      */
     public void setMinEvictableIdleTimeMillis(int minEvictableIdleTimeMillis) {



Mime
View raw message