This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch POOL_2_X in repository https://gitbox.apache.org/repos/asf/commons-pool.git
The following commit(s) were added to refs/heads/POOL_2_X by this push: new 1ffc7a17 Add BaseObjectPoolConfig.DEFAULT_DURATION_BETWEEN_EVICTION_RUNS and deprecate BaseObjectPoolConfig.DEFAULT_TIME_BETWEEN_EVICTION_RUNS. 1ffc7a17 is described below commit 1ffc7a176767b0f4f75eeed1eabe582e4fac186b Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Tue Jul 18 09:31:04 2023 -0400 Add BaseObjectPoolConfig.DEFAULT_DURATION_BETWEEN_EVICTION_RUNS and deprecate BaseObjectPoolConfig.DEFAULT_TIME_BETWEEN_EVICTION_RUNS. Javadoc --- src/changes/changes.xml | 3 + .../commons/pool2/impl/BaseGenericObjectPool.java | 4 +- .../commons/pool2/impl/BaseObjectPoolConfig.java | 487 +++++++-------------- .../pool2/impl/TestGenericKeyedObjectPool.java | 2 +- .../commons/pool2/impl/TestGenericObjectPool.java | 2 +- 5 files changed, 173 insertions(+), 325 deletions(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 77759221..864dfb7c 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -117,6 +117,9 @@ The <action> type attribute can be add,update,fix,remove. <action dev="ggregory" type="add"> Add BaseGenericObjectPool methods that return Duration and deprecate equivalents that return milliseconds as long. </action> + <action dev="ggregory" type="add"> + Add BaseObjectPoolConfig.DEFAULT_DURATION_BETWEEN_EVICTION_RUNS and deprecate BaseObjectPoolConfig.DEFAULT_TIME_BETWEEN_EVICTION_RUNS. + </action> <!-- UPDATE --> <action dev="kinow" type="update" due-to="Dependabot, Gary Gregory"> Bump actions/cache from 2.1.6 to 3.0.10 #117, #138, #158, #174, #178. diff --git a/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java b/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java index 440f3b1c..4277ce86 100644 --- a/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java @@ -355,7 +355,7 @@ public abstract class BaseGenericObjectPool<T> extends BaseObject implements Aut private volatile boolean testOnBorrow = BaseObjectPoolConfig.DEFAULT_TEST_ON_BORROW; private volatile boolean testOnReturn = BaseObjectPoolConfig.DEFAULT_TEST_ON_RETURN; private volatile boolean testWhileIdle = BaseObjectPoolConfig.DEFAULT_TEST_WHILE_IDLE; - private volatile Duration durationBetweenEvictionRuns = BaseObjectPoolConfig.DEFAULT_TIME_BETWEEN_EVICTION_RUNS; + private volatile Duration durationBetweenEvictionRuns = BaseObjectPoolConfig.DEFAULT_DURATION_BETWEEN_EVICTION_RUNS; private volatile int numTestsPerEvictionRun = BaseObjectPoolConfig.DEFAULT_NUM_TESTS_PER_EVICTION_RUN; private volatile Duration minEvictableIdleDuration = BaseObjectPoolConfig.DEFAULT_MIN_EVICTABLE_IDLE_DURATION; @@ -1828,7 +1828,7 @@ public abstract class BaseGenericObjectPool<T> extends BaseObject implements Aut * @since 2.10.0 */ public final void setTimeBetweenEvictionRuns(final Duration timeBetweenEvictionRuns) { - this.durationBetweenEvictionRuns = PoolImplUtils.nonNull(timeBetweenEvictionRuns, BaseObjectPoolConfig.DEFAULT_TIME_BETWEEN_EVICTION_RUNS); + this.durationBetweenEvictionRuns = PoolImplUtils.nonNull(timeBetweenEvictionRuns, BaseObjectPoolConfig.DEFAULT_DURATION_BETWEEN_EVICTION_RUNS); startEvictor(this.durationBetweenEvictionRuns); } diff --git a/src/main/java/org/apache/commons/pool2/impl/BaseObjectPoolConfig.java b/src/main/java/org/apache/commons/pool2/impl/BaseObjectPoolConfig.java index 08110548..101e17e9 100644 --- a/src/main/java/org/apache/commons/pool2/impl/BaseObjectPoolConfig.java +++ b/src/main/java/org/apache/commons/pool2/impl/BaseObjectPoolConfig.java @@ -21,9 +21,8 @@ import java.time.Duration; import org.apache.commons.pool2.BaseObject; /** - * Provides the implementation for the common attributes shared by the - * sub-classes. New instances of this class will be created using the defaults - * defined by the public constants. + * Provides the implementation for the common attributes shared by the sub-classes. New instances of this class will be created using the defaults defined by + * the public constants. * <p> * This class is not thread-safe. * </p> @@ -35,6 +34,7 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon /** * The default value for the {@code lifo} configuration attribute. + * * @see GenericObjectPool#getLifo() * @see GenericKeyedObjectPool#getLifo() */ @@ -42,6 +42,7 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon /** * The default value for the {@code fairness} configuration attribute. + * * @see GenericObjectPool#getFairness() * @see GenericKeyedObjectPool#getFairness() */ @@ -49,6 +50,7 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon /** * The default value for the {@code maxWait} configuration attribute. + * * @see GenericObjectPool#getMaxWaitDuration() * @see GenericKeyedObjectPool#getMaxWaitDuration() * @deprecated Use {@link #DEFAULT_MAX_WAIT}. @@ -58,6 +60,7 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon /** * The default value for the {@code maxWait} configuration attribute. + * * @see GenericObjectPool#getMaxWaitDuration() * @see GenericKeyedObjectPool#getMaxWaitDuration() * @since 2.10.0 @@ -65,8 +68,8 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon public static final Duration DEFAULT_MAX_WAIT = Duration.ofMillis(DEFAULT_MAX_WAIT_MILLIS); /** - * The default value for the {@code minEvictableIdleDuration} - * configuration attribute. + * The default value for the {@code minEvictableIdleDuration} configuration attribute. + * * @see GenericObjectPool#getMinEvictableIdleDuration() * @see GenericKeyedObjectPool#getMinEvictableIdleDuration() * @deprecated Use {@link #DEFAULT_MIN_EVICTABLE_IDLE_TIME}. @@ -75,30 +78,28 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon public static final long DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS = 1000L * 60L * 30L; /** - * The default value for the {@code minEvictableIdleDuration} - * configuration attribute. + * The default value for the {@code minEvictableIdleDuration} configuration attribute. + * * @see GenericObjectPool#getMinEvictableIdleDuration() * @see GenericKeyedObjectPool#getMinEvictableIdleDuration() * @since 2.11.0 */ - public static final Duration DEFAULT_MIN_EVICTABLE_IDLE_DURATION = - Duration.ofMillis(DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS); + public static final Duration DEFAULT_MIN_EVICTABLE_IDLE_DURATION = Duration.ofMillis(DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS); /** - * The default value for the {@code minEvictableIdleDuration} - * configuration attribute. + * The default value for the {@code minEvictableIdleDuration} configuration attribute. + * * @see GenericObjectPool#getMinEvictableIdleDuration() * @see GenericKeyedObjectPool#getMinEvictableIdleDuration() * @since 2.10.0 * @deprecated Use {@link #DEFAULT_MIN_EVICTABLE_IDLE_DURATION}. */ @Deprecated - public static final Duration DEFAULT_MIN_EVICTABLE_IDLE_TIME = - Duration.ofMillis(DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS); + public static final Duration DEFAULT_MIN_EVICTABLE_IDLE_TIME = Duration.ofMillis(DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS); /** - * The default value for the {@code softMinEvictableIdleTime} - * configuration attribute. + * The default value for the {@code softMinEvictableIdleTime} configuration attribute. + * * @see GenericObjectPool#getSoftMinEvictableIdleDuration() * @see GenericKeyedObjectPool#getSoftMinEvictableIdleDuration() * @deprecated Use {@link #DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME}. @@ -107,30 +108,28 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon public static final long DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME_MILLIS = -1; /** - * The default value for the {@code softMinEvictableIdleTime} - * configuration attribute. + * The default value for the {@code softMinEvictableIdleTime} configuration attribute. + * * @see GenericObjectPool#getSoftMinEvictableIdleDuration() * @see GenericKeyedObjectPool#getSoftMinEvictableIdleDuration() * @since 2.10.0 * @deprecated Use {@link #DEFAULT_SOFT_MIN_EVICTABLE_IDLE_DURATION}. */ @Deprecated - public static final Duration DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME = - Duration.ofMillis(DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME_MILLIS); + public static final Duration DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME = Duration.ofMillis(DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME_MILLIS); /** - * The default value for the {@code softMinEvictableIdleTime} - * configuration attribute. + * The default value for the {@code softMinEvictableIdleTime} configuration attribute. + * * @see GenericObjectPool#getSoftMinEvictableIdleDuration() * @see GenericKeyedObjectPool#getSoftMinEvictableIdleDuration() * @since 2.11.0 */ - public static final Duration DEFAULT_SOFT_MIN_EVICTABLE_IDLE_DURATION = - Duration.ofMillis(DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME_MILLIS); + public static final Duration DEFAULT_SOFT_MIN_EVICTABLE_IDLE_DURATION = Duration.ofMillis(DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME_MILLIS); /** - * The default value for {@code evictorShutdownTimeout} configuration - * attribute. + * The default value for {@code evictorShutdownTimeout} configuration attribute. + * * @see GenericObjectPool#getEvictorShutdownTimeoutDuration() * @see GenericKeyedObjectPool#getEvictorShutdownTimeoutDuration() * @deprecated Use {@link #DEFAULT_EVICTOR_SHUTDOWN_TIMEOUT}. @@ -139,18 +138,17 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon public static final long DEFAULT_EVICTOR_SHUTDOWN_TIMEOUT_MILLIS = 10L * 1000L; /** - * The default value for {@code evictorShutdownTimeout} configuration - * attribute. + * The default value for {@code evictorShutdownTimeout} configuration attribute. + * * @see GenericObjectPool#getEvictorShutdownTimeoutDuration() * @see GenericKeyedObjectPool#getEvictorShutdownTimeoutDuration() * @since 2.10.0 */ - public static final Duration DEFAULT_EVICTOR_SHUTDOWN_TIMEOUT = - Duration.ofMillis(DEFAULT_EVICTOR_SHUTDOWN_TIMEOUT_MILLIS); + public static final Duration DEFAULT_EVICTOR_SHUTDOWN_TIMEOUT = Duration.ofMillis(DEFAULT_EVICTOR_SHUTDOWN_TIMEOUT_MILLIS); /** - * The default value for the {@code numTestsPerEvictionRun} configuration - * attribute. + * The default value for the {@code numTestsPerEvictionRun} configuration attribute. + * * @see GenericObjectPool#getNumTestsPerEvictionRun() * @see GenericKeyedObjectPool#getNumTestsPerEvictionRun() */ @@ -158,6 +156,7 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon /** * The default value for the {@code testOnCreate} configuration attribute. + * * @see GenericObjectPool#getTestOnCreate() * @see GenericKeyedObjectPool#getTestOnCreate() * @@ -167,6 +166,7 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon /** * The default value for the {@code testOnBorrow} configuration attribute. + * * @see GenericObjectPool#getTestOnBorrow() * @see GenericKeyedObjectPool#getTestOnBorrow() */ @@ -174,6 +174,7 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon /** * The default value for the {@code testOnReturn} configuration attribute. + * * @see GenericObjectPool#getTestOnReturn() * @see GenericKeyedObjectPool#getTestOnReturn() */ @@ -181,14 +182,15 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon /** * The default value for the {@code testWhileIdle} configuration attribute. + * * @see GenericObjectPool#getTestWhileIdle() * @see GenericKeyedObjectPool#getTestWhileIdle() */ public static final boolean DEFAULT_TEST_WHILE_IDLE = false; /** - * The default value for the {@code timeBetweenEvictionRuns} - * configuration attribute. + * The default value for the {@code timeBetweenEvictionRuns} configuration attribute. + * * @see GenericObjectPool#getDurationBetweenEvictionRuns() * @see GenericKeyedObjectPool#getDurationBetweenEvictionRuns() * @deprecated Use {@link #DEFAULT_TIME_BETWEEN_EVICTION_RUNS}. @@ -197,48 +199,57 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon public static final long DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS = -1L; /** - * The default value for the {@code timeBetweenEvictionRuns} - * configuration attribute. + * The default value for the {@code timeBetweenEvictionRuns} configuration attribute. + * * @see GenericObjectPool#getDurationBetweenEvictionRuns() * @see GenericKeyedObjectPool#getDurationBetweenEvictionRuns() + * @since 2.12.0 */ - public static final Duration DEFAULT_TIME_BETWEEN_EVICTION_RUNS = Duration - .ofMillis(DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS); + public static final Duration DEFAULT_DURATION_BETWEEN_EVICTION_RUNS = Duration.ofMillis(DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS); /** - * The default value for the {@code blockWhenExhausted} configuration - * attribute. + * The default value for the {@code timeBetweenEvictionRuns} configuration attribute. + * + * @see GenericObjectPool#getDurationBetweenEvictionRuns() + * @see GenericKeyedObjectPool#getDurationBetweenEvictionRuns() + * @deprecated Use {@link #DEFAULT_DURATION_BETWEEN_EVICTION_RUNS}. + */ + @Deprecated + public static final Duration DEFAULT_TIME_BETWEEN_EVICTION_RUNS = Duration.ofMillis(DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS); + + /** + * The default value for the {@code blockWhenExhausted} configuration attribute. + * * @see GenericObjectPool#getBlockWhenExhausted() * @see GenericKeyedObjectPool#getBlockWhenExhausted() */ public static final boolean DEFAULT_BLOCK_WHEN_EXHAUSTED = true; /** - * The default value for enabling JMX for pools created with a configuration - * instance. + * The default value for enabling JMX for pools created with a configuration instance. */ public static final boolean DEFAULT_JMX_ENABLE = true; /** - * The default value for the prefix used to name JMX enabled pools created - * with a configuration instance. + * The default value for the prefix used to name JMX enabled pools created with a configuration instance. + * * @see GenericObjectPool#getJmxName() * @see GenericKeyedObjectPool#getJmxName() */ public static final String DEFAULT_JMX_NAME_PREFIX = "pool"; /** - * The default value for the base name to use to name JMX enabled pools - * created with a configuration instance. The default is {@code null} - * which means the pool will provide the base name to use. + * The default value for the base name to use to name JMX enabled pools created with a configuration instance. The default is {@code null} which means the + * pool will provide the base name to use. + * * @see GenericObjectPool#getJmxName() * @see GenericKeyedObjectPool#getJmxName() */ public static final String DEFAULT_JMX_NAME_BASE = null; /** - * The default value for the {@code evictionPolicyClassName} configuration - * attribute. + * The default value for the {@code evictionPolicyClassName} configuration attribute. + * * @see GenericObjectPool#getEvictionPolicyClassName() * @see GenericKeyedObjectPool#getEvictionPolicyClassName() */ @@ -270,7 +281,7 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon private boolean testWhileIdle = DEFAULT_TEST_WHILE_IDLE; - private Duration durationBetweenEvictionRuns = DEFAULT_TIME_BETWEEN_EVICTION_RUNS; + private Duration durationBetweenEvictionRuns = DEFAULT_DURATION_BETWEEN_EVICTION_RUNS; private boolean blockWhenExhausted = DEFAULT_BLOCK_WHEN_EXHAUSTED; @@ -281,14 +292,10 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon private String jmxNameBase = DEFAULT_JMX_NAME_BASE; - /** - * Gets the value for the {@code blockWhenExhausted} configuration attribute - * for pools created with this configuration instance. - * - * @return The current setting of {@code blockWhenExhausted} for this - * configuration instance + * Gets the value for the {@code blockWhenExhausted} configuration attribute for pools created with this configuration instance. * + * @return The current setting of {@code blockWhenExhausted} for this configuration instance * @see GenericObjectPool#getBlockWhenExhausted() * @see GenericKeyedObjectPool#getBlockWhenExhausted() */ @@ -297,12 +304,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Gets the value for the {@code timeBetweenEvictionRuns} configuration - * attribute for pools created with this configuration instance. - * - * @return The current setting of {@code timeBetweenEvictionRuns} for - * this configuration instance + * Gets the value for the {@code timeBetweenEvictionRuns} configuration attribute for pools created with this configuration instance. * + * @return The current setting of {@code timeBetweenEvictionRuns} for this configuration instance * @see GenericObjectPool#getDurationBetweenEvictionRuns() * @see GenericKeyedObjectPool#getDurationBetweenEvictionRuns() * @since 2.11.0 @@ -312,12 +316,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Gets the value for the {@code evictionPolicyClass} configuration - * attribute for pools created with this configuration instance. - * - * @return The current setting of {@code evictionPolicyClass} for this - * configuration instance + * Gets the value for the {@code evictionPolicyClass} configuration attribute for pools created with this configuration instance. * + * @return The current setting of {@code evictionPolicyClass} for this configuration instance * @see GenericObjectPool#getEvictionPolicy() * @see GenericKeyedObjectPool#getEvictionPolicy() * @since 2.6.0 @@ -327,12 +328,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Gets the value for the {@code evictionPolicyClassName} configuration - * attribute for pools created with this configuration instance. - * - * @return The current setting of {@code evictionPolicyClassName} for this - * configuration instance + * Gets the value for the {@code evictionPolicyClassName} configuration attribute for pools created with this configuration instance. * + * @return The current setting of {@code evictionPolicyClassName} for this configuration instance * @see GenericObjectPool#getEvictionPolicyClassName() * @see GenericKeyedObjectPool#getEvictionPolicyClassName() */ @@ -341,12 +339,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Gets the value for the {@code evictorShutdownTimeout} configuration - * attribute for pools created with this configuration instance. - * - * @return The current setting of {@code evictorShutdownTimeout} for - * this configuration instance + * Gets the value for the {@code evictorShutdownTimeout} configuration attribute for pools created with this configuration instance. * + * @return The current setting of {@code evictorShutdownTimeout} for this configuration instance * @see GenericObjectPool#getEvictorShutdownTimeoutDuration() * @see GenericKeyedObjectPool#getEvictorShutdownTimeoutDuration() * @since 2.10.0 @@ -358,12 +353,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Gets the value for the {@code evictorShutdownTimeout} configuration - * attribute for pools created with this configuration instance. - * - * @return The current setting of {@code evictorShutdownTimeout} for - * this configuration instance + * Gets the value for the {@code evictorShutdownTimeout} configuration attribute for pools created with this configuration instance. * + * @return The current setting of {@code evictorShutdownTimeout} for this configuration instance * @see GenericObjectPool#getEvictorShutdownTimeoutDuration() * @see GenericKeyedObjectPool#getEvictorShutdownTimeoutDuration() * @since 2.11.0 @@ -373,12 +365,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Gets the value for the {@code evictorShutdownTimeout} configuration - * attribute for pools created with this configuration instance. - * - * @return The current setting of {@code evictorShutdownTimeout} for - * this configuration instance + * Gets the value for the {@code evictorShutdownTimeout} configuration attribute for pools created with this configuration instance. * + * @return The current setting of {@code evictorShutdownTimeout} for this configuration instance * @see GenericObjectPool#getEvictorShutdownTimeoutDuration() * @see GenericKeyedObjectPool#getEvictorShutdownTimeoutDuration() * @deprecated Use {@link #getEvictorShutdownTimeout()}. @@ -389,12 +378,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Gets the value for the {@code fairness} configuration attribute for pools - * created with this configuration instance. - * - * @return The current setting of {@code fairness} for this configuration - * instance + * Gets the value for the {@code fairness} configuration attribute for pools created with this configuration instance. * + * @return The current setting of {@code fairness} for this configuration instance * @see GenericObjectPool#getFairness() * @see GenericKeyedObjectPool#getFairness() */ @@ -403,47 +389,37 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Gets the value of the flag that determines if JMX will be enabled for - * pools created with this configuration instance. + * Gets the value of the flag that determines if JMX will be enabled for pools created with this configuration instance. * - * @return The current setting of {@code jmxEnabled} for this configuration - * instance + * @return The current setting of {@code jmxEnabled} for this configuration instance */ public boolean getJmxEnabled() { return jmxEnabled; } /** - * Gets the value of the JMX name base that will be used as part of the - * name assigned to JMX enabled pools created with this configuration - * instance. A value of {@code null} means that the pool will define - * the JMX name base. + * Gets the value of the JMX name base that will be used as part of the name assigned to JMX enabled pools created with this configuration instance. A value + * of {@code null} means that the pool will define the JMX name base. * - * @return The current setting of {@code jmxNameBase} for this - * configuration instance + * @return The current setting of {@code jmxNameBase} for this configuration instance */ public String getJmxNameBase() { return jmxNameBase; } /** - * Gets the value of the JMX name prefix that will be used as part of the - * name assigned to JMX enabled pools created with this configuration - * instance. + * Gets the value of the JMX name prefix that will be used as part of the name assigned to JMX enabled pools created with this configuration instance. * - * @return The current setting of {@code jmxNamePrefix} for this - * configuration instance + * @return The current setting of {@code jmxNamePrefix} for this configuration instance */ public String getJmxNamePrefix() { return jmxNamePrefix; } /** - * Gets the value for the {@code lifo} configuration attribute for pools - * created with this configuration instance. + * Gets the value for the {@code lifo} configuration attribute for pools created with this configuration instance. * - * @return The current setting of {@code lifo} for this configuration - * instance + * @return The current setting of {@code lifo} for this configuration instance * * @see GenericObjectPool#getLifo() * @see GenericKeyedObjectPool#getLifo() @@ -453,12 +429,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Gets the value for the {@code maxWait} configuration attribute for pools - * created with this configuration instance. - * - * @return The current setting of {@code maxWait} for this - * configuration instance + * Gets the value for the {@code maxWait} configuration attribute for pools created with this configuration instance. * + * @return The current setting of {@code maxWait} for this configuration instance * @see GenericObjectPool#getMaxWaitDuration() * @see GenericKeyedObjectPool#getMaxWaitDuration() * @since 2.11.0 @@ -468,12 +441,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Gets the value for the {@code maxWait} configuration attribute for pools - * created with this configuration instance. - * - * @return The current setting of {@code maxWait} for this - * configuration instance + * Gets the value for the {@code maxWait} configuration attribute for pools created with this configuration instance. * + * @return The current setting of {@code maxWait} for this configuration instance * @see GenericObjectPool#getMaxWaitDuration() * @see GenericKeyedObjectPool#getMaxWaitDuration() * @deprecated Use {@link #getMaxWaitDuration()}. @@ -484,12 +454,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Gets the value for the {@code minEvictableIdleTime} configuration - * attribute for pools created with this configuration instance. - * - * @return The current setting of {@code minEvictableIdleTime} for - * this configuration instance + * Gets the value for the {@code minEvictableIdleTime} configuration attribute for pools created with this configuration instance. * + * @return The current setting of {@code minEvictableIdleTime} for this configuration instance * @see GenericObjectPool#getMinEvictableIdleDuration() * @see GenericKeyedObjectPool#getMinEvictableIdleDuration() * @since 2.11.0 @@ -499,12 +466,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Gets the value for the {@code minEvictableIdleTime} configuration - * attribute for pools created with this configuration instance. - * - * @return The current setting of {@code minEvictableIdleTime} for - * this configuration instance + * Gets the value for the {@code minEvictableIdleTime} configuration attribute for pools created with this configuration instance. * + * @return The current setting of {@code minEvictableIdleTime} for this configuration instance * @see GenericObjectPool#getMinEvictableIdleDuration() * @see GenericKeyedObjectPool#getMinEvictableIdleDuration() * @since 2.10.0 @@ -516,12 +480,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Gets the value for the {@code minEvictableIdleTime} configuration - * attribute for pools created with this configuration instance. - * - * @return The current setting of {@code minEvictableIdleTime} for - * this configuration instance + * Gets the value for the {@code minEvictableIdleTime} configuration attribute for pools created with this configuration instance. * + * @return The current setting of {@code minEvictableIdleTime} for this configuration instance * @see GenericObjectPool#getMinEvictableIdleDuration() * @see GenericKeyedObjectPool#getMinEvictableIdleDuration() * @deprecated Use {@link #getMinEvictableIdleTime()}. @@ -532,12 +493,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Gets the value for the {@code numTestsPerEvictionRun} configuration - * attribute for pools created with this configuration instance. - * - * @return The current setting of {@code numTestsPerEvictionRun} for this - * configuration instance + * Gets the value for the {@code numTestsPerEvictionRun} configuration attribute for pools created with this configuration instance. * + * @return The current setting of {@code numTestsPerEvictionRun} for this configuration instance * @see GenericObjectPool#getNumTestsPerEvictionRun() * @see GenericKeyedObjectPool#getNumTestsPerEvictionRun() */ @@ -546,13 +504,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Gets the value for the {@code softMinEvictableIdleTime} - * configuration attribute for pools created with this configuration - * instance. - * - * @return The current setting of {@code softMinEvictableIdleTime} - * for this configuration instance + * Gets the value for the {@code softMinEvictableIdleTime} configuration attribute for pools created with this configuration instance. * + * @return The current setting of {@code softMinEvictableIdleTime} for this configuration instance * @see GenericObjectPool#getSoftMinEvictableIdleDuration() * @see GenericKeyedObjectPool#getSoftMinEvictableIdleDuration() * @since 2.11.0 @@ -562,13 +516,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Gets the value for the {@code softMinEvictableIdleTime} - * configuration attribute for pools created with this configuration - * instance. - * - * @return The current setting of {@code softMinEvictableIdleTime} - * for this configuration instance + * Gets the value for the {@code softMinEvictableIdleTime} configuration attribute for pools created with this configuration instance. * + * @return The current setting of {@code softMinEvictableIdleTime} for this configuration instance * @see GenericObjectPool#getSoftMinEvictableIdleDuration() * @see GenericKeyedObjectPool#getSoftMinEvictableIdleDuration() * @since 2.10.0 @@ -580,13 +530,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Gets the value for the {@code softMinEvictableIdleTime} - * configuration attribute for pools created with this configuration - * instance. - * - * @return The current setting of {@code softMinEvictableIdleTime} - * for this configuration instance + * Gets the value for the {@code softMinEvictableIdleTime} configuration attribute for pools created with this configuration instance. * + * @return The current setting of {@code softMinEvictableIdleTime} for this configuration instance * @see GenericObjectPool#getSoftMinEvictableIdleDuration() * @see GenericKeyedObjectPool#getSoftMinEvictableIdleDuration() * @deprecated Use {@link #getSoftMinEvictableIdleDuration()}. @@ -597,12 +543,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Gets the value for the {@code testOnBorrow} configuration attribute for - * pools created with this configuration instance. - * - * @return The current setting of {@code testOnBorrow} for this - * configuration instance + * Gets the value for the {@code testOnBorrow} configuration attribute for pools created with this configuration instance. * + * @return The current setting of {@code testOnBorrow} for this configuration instance * @see GenericObjectPool#getTestOnBorrow() * @see GenericKeyedObjectPool#getTestOnBorrow() */ @@ -611,15 +554,11 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Gets the value for the {@code testOnCreate} configuration attribute for - * pools created with this configuration instance. - * - * @return The current setting of {@code testOnCreate} for this - * configuration instance + * Gets the value for the {@code testOnCreate} configuration attribute for pools created with this configuration instance. * + * @return The current setting of {@code testOnCreate} for this configuration instance * @see GenericObjectPool#getTestOnCreate() * @see GenericKeyedObjectPool#getTestOnCreate() - * * @since 2.2 */ public boolean getTestOnCreate() { @@ -627,12 +566,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Gets the value for the {@code testOnReturn} configuration attribute for - * pools created with this configuration instance. - * - * @return The current setting of {@code testOnReturn} for this - * configuration instance + * Gets the value for the {@code testOnReturn} configuration attribute for pools created with this configuration instance. * + * @return The current setting of {@code testOnReturn} for this configuration instance * @see GenericObjectPool#getTestOnReturn() * @see GenericKeyedObjectPool#getTestOnReturn() */ @@ -641,12 +577,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Gets the value for the {@code testWhileIdle} configuration attribute for - * pools created with this configuration instance. - * - * @return The current setting of {@code testWhileIdle} for this - * configuration instance + * Gets the value for the {@code testWhileIdle} configuration attribute for pools created with this configuration instance. * + * @return The current setting of {@code testWhileIdle} for this configuration instance * @see GenericObjectPool#getTestWhileIdle() * @see GenericKeyedObjectPool#getTestWhileIdle() */ @@ -655,12 +588,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Gets the value for the {@code timeBetweenEvictionRuns} configuration - * attribute for pools created with this configuration instance. - * - * @return The current setting of {@code timeBetweenEvictionRuns} for - * this configuration instance + * Gets the value for the {@code timeBetweenEvictionRuns} configuration attribute for pools created with this configuration instance. * + * @return The current setting of {@code timeBetweenEvictionRuns} for this configuration instance * @see GenericObjectPool#getDurationBetweenEvictionRuns() * @see GenericKeyedObjectPool#getDurationBetweenEvictionRuns() * @since 2.10.0 @@ -672,12 +602,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Gets the value for the {@code timeBetweenEvictionRuns} configuration - * attribute for pools created with this configuration instance. - * - * @return The current setting of {@code timeBetweenEvictionRuns} for - * this configuration instance + * Gets the value for the {@code timeBetweenEvictionRuns} configuration attribute for pools created with this configuration instance. * + * @return The current setting of {@code timeBetweenEvictionRuns} for this configuration instance * @see GenericObjectPool#getDurationBetweenEvictionRuns() * @see GenericKeyedObjectPool#getDurationBetweenEvictionRuns() * @deprecated Use {@link #getDurationBetweenEvictionRuns()}. @@ -688,12 +615,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Sets the value for the {@code blockWhenExhausted} configuration attribute - * for pools created with this configuration instance. - * - * @param blockWhenExhausted The new setting of {@code blockWhenExhausted} - * for this configuration instance + * Sets the value for the {@code blockWhenExhausted} configuration attribute for pools created with this configuration instance. * + * @param blockWhenExhausted The new setting of {@code blockWhenExhausted} for this configuration instance * @see GenericObjectPool#getBlockWhenExhausted() * @see GenericKeyedObjectPool#getBlockWhenExhausted() */ @@ -702,12 +626,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Sets the value for the {@code evictionPolicyClass} configuration - * attribute for pools created with this configuration instance. - * - * @param evictionPolicy The new setting of - * {@code evictionPolicyClass} for this configuration instance + * Sets the value for the {@code evictionPolicyClass} configuration attribute for pools created with this configuration instance. * + * @param evictionPolicy The new setting of {@code evictionPolicyClass} for this configuration instance * @see GenericObjectPool#getEvictionPolicy() * @see GenericKeyedObjectPool#getEvictionPolicy() * @since 2.6.0 @@ -717,12 +638,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Sets the value for the {@code evictionPolicyClassName} configuration - * attribute for pools created with this configuration instance. - * - * @param evictionPolicyClassName The new setting of - * {@code evictionPolicyClassName} for this configuration instance + * Sets the value for the {@code evictionPolicyClassName} configuration attribute for pools created with this configuration instance. * + * @param evictionPolicyClassName The new setting of {@code evictionPolicyClassName} for this configuration instance * @see GenericObjectPool#getEvictionPolicyClassName() * @see GenericKeyedObjectPool#getEvictionPolicyClassName() */ @@ -731,13 +649,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Sets the value for the {@code evictorShutdownTimeout} configuration - * attribute for pools created with this configuration instance. - * - * @param evictorShutdownTimeoutDuration The new setting of - * {@code evictorShutdownTimeout} for this configuration - * instance + * Sets the value for the {@code evictorShutdownTimeout} configuration attribute for pools created with this configuration instance. * + * @param evictorShutdownTimeoutDuration The new setting of {@code evictorShutdownTimeout} for this configuration instance * @see GenericObjectPool#getEvictorShutdownTimeoutDuration() * @see GenericKeyedObjectPool#getEvictorShutdownTimeoutDuration() * @since 2.11.0 @@ -747,13 +661,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Sets the value for the {@code evictorShutdownTimeout} configuration - * attribute for pools created with this configuration instance. - * - * @param evictorShutdownTimeout The new setting of - * {@code evictorShutdownTimeout} for this configuration - * instance + * Sets the value for the {@code evictorShutdownTimeout} configuration attribute for pools created with this configuration instance. * + * @param evictorShutdownTimeout The new setting of {@code evictorShutdownTimeout} for this configuration instance * @see GenericObjectPool#getEvictorShutdownTimeoutDuration() * @see GenericKeyedObjectPool#getEvictorShutdownTimeoutDuration() * @since 2.10.0 @@ -765,13 +675,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Sets the value for the {@code evictorShutdownTimeout} configuration - * attribute for pools created with this configuration instance. - * - * @param evictorShutdownTimeoutMillis The new setting of - * {@code evictorShutdownTimeout} for this configuration - * instance + * Sets the value for the {@code evictorShutdownTimeout} configuration attribute for pools created with this configuration instance. * + * @param evictorShutdownTimeoutMillis The new setting of {@code evictorShutdownTimeout} for this configuration instance * @see GenericObjectPool#getEvictorShutdownTimeoutDuration() * @see GenericKeyedObjectPool#getEvictorShutdownTimeoutDuration() * @deprecated Use {@link #setEvictorShutdownTimeout(Duration)}. @@ -782,12 +688,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Sets the value for the {@code fairness} configuration attribute for pools - * created with this configuration instance. - * - * @param fairness The new setting of {@code fairness} - * for this configuration instance + * Sets the value for the {@code fairness} configuration attribute for pools created with this configuration instance. * + * @param fairness The new setting of {@code fairness} for this configuration instance * @see GenericObjectPool#getFairness() * @see GenericKeyedObjectPool#getFairness() */ @@ -796,48 +699,37 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Sets the value of the flag that determines if JMX will be enabled for - * pools created with this configuration instance. + * Sets the value of the flag that determines if JMX will be enabled for pools created with this configuration instance. * - * @param jmxEnabled The new setting of {@code jmxEnabled} - * for this configuration instance + * @param jmxEnabled The new setting of {@code jmxEnabled} for this configuration instance */ public void setJmxEnabled(final boolean jmxEnabled) { this.jmxEnabled = jmxEnabled; } /** - * Sets the value of the JMX name base that will be used as part of the - * name assigned to JMX enabled pools created with this configuration - * instance. A value of {@code null} means that the pool will define - * the JMX name base. + * Sets the value of the JMX name base that will be used as part of the name assigned to JMX enabled pools created with this configuration instance. A value + * of {@code null} means that the pool will define the JMX name base. * - * @param jmxNameBase The new setting of {@code jmxNameBase} - * for this configuration instance + * @param jmxNameBase The new setting of {@code jmxNameBase} for this configuration instance */ public void setJmxNameBase(final String jmxNameBase) { this.jmxNameBase = jmxNameBase; } /** - * Sets the value of the JMX name prefix that will be used as part of the - * name assigned to JMX enabled pools created with this configuration - * instance. + * Sets the value of the JMX name prefix that will be used as part of the name assigned to JMX enabled pools created with this configuration instance. * - * @param jmxNamePrefix The new setting of {@code jmxNamePrefix} - * for this configuration instance + * @param jmxNamePrefix The new setting of {@code jmxNamePrefix} for this configuration instance */ public void setJmxNamePrefix(final String jmxNamePrefix) { this.jmxNamePrefix = jmxNamePrefix; } /** - * Sets the value for the {@code lifo} configuration attribute for pools - * created with this configuration instance. - * - * @param lifo The new setting of {@code lifo} - * for this configuration instance + * Sets the value for the {@code lifo} configuration attribute for pools created with this configuration instance. * + * @param lifo The new setting of {@code lifo} for this configuration instance * @see GenericObjectPool#getLifo() * @see GenericKeyedObjectPool#getLifo() */ @@ -846,12 +738,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Sets the value for the {@code maxWait} configuration attribute for pools - * created with this configuration instance. - * - * @param maxWaitDuration The new setting of {@code maxWaitDuration} - * for this configuration instance + * Sets the value for the {@code maxWait} configuration attribute for pools created with this configuration instance. * + * @param maxWaitDuration The new setting of {@code maxWaitDuration} for this configuration instance * @see GenericObjectPool#getMaxWaitDuration() * @see GenericKeyedObjectPool#getMaxWaitDuration() * @since 2.11.0 @@ -861,12 +750,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Sets the value for the {@code maxWait} configuration attribute for pools - * created with this configuration instance. - * - * @param maxWaitMillis The new setting of {@code maxWaitMillis} - * for this configuration instance + * Sets the value for the {@code maxWait} configuration attribute for pools created with this configuration instance. * + * @param maxWaitMillis The new setting of {@code maxWaitMillis} for this configuration instance * @see GenericObjectPool#getMaxWaitDuration() * @see GenericKeyedObjectPool#getMaxWaitDuration() * @deprecated Use {@link #setMaxWait(Duration)}. @@ -877,12 +763,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Sets the value for the {@code minEvictableIdleTime} configuration - * attribute for pools created with this configuration instance. - * - * @param minEvictableIdleTime The new setting of - * {@code minEvictableIdleTime} for this configuration instance + * Sets the value for the {@code minEvictableIdleTime} configuration attribute for pools created with this configuration instance. * + * @param minEvictableIdleTime The new setting of {@code minEvictableIdleTime} for this configuration instance * @see GenericObjectPool#getMinEvictableIdleDuration() * @see GenericKeyedObjectPool#getMinEvictableIdleDuration() * @since 2.10.0 @@ -892,12 +775,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Sets the value for the {@code minEvictableIdleTime} configuration - * attribute for pools created with this configuration instance. - * - * @param minEvictableIdleTimeMillis The new setting of - * {@code minEvictableIdleTime} for this configuration instance + * Sets the value for the {@code minEvictableIdleTime} configuration attribute for pools created with this configuration instance. * + * @param minEvictableIdleTimeMillis The new setting of {@code minEvictableIdleTime} for this configuration instance * @see GenericObjectPool#getMinEvictableIdleDuration() * @see GenericKeyedObjectPool#getMinEvictableIdleDuration() * @deprecated Use {@link #setMinEvictableIdleTime(Duration)}. @@ -908,12 +788,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Sets the value for the {@code numTestsPerEvictionRun} configuration - * attribute for pools created with this configuration instance. - * - * @param numTestsPerEvictionRun The new setting of - * {@code numTestsPerEvictionRun} for this configuration instance + * Sets the value for the {@code numTestsPerEvictionRun} configuration attribute for pools created with this configuration instance. * + * @param numTestsPerEvictionRun The new setting of {@code numTestsPerEvictionRun} for this configuration instance * @see GenericObjectPool#getNumTestsPerEvictionRun() * @see GenericKeyedObjectPool#getNumTestsPerEvictionRun() */ @@ -922,14 +799,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Sets the value for the {@code softMinEvictableIdleTime} - * configuration attribute for pools created with this configuration - * instance. - * - * @param softMinEvictableIdleTime The new setting of - * {@code softMinEvictableIdleTime} for this configuration - * instance + * Sets the value for the {@code softMinEvictableIdleTime} configuration attribute for pools created with this configuration instance. * + * @param softMinEvictableIdleTime The new setting of {@code softMinEvictableIdleTime} for this configuration instance * @see GenericObjectPool#getSoftMinEvictableIdleDuration() * @see GenericKeyedObjectPool#getSoftMinEvictableIdleDuration() * @since 2.10.0 @@ -939,31 +811,22 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Sets the value for the {@code softMinEvictableIdleTime} - * configuration attribute for pools created with this configuration - * instance. - * - * @param softMinEvictableIdleTimeMillis The new setting of - * {@code softMinEvictableIdleTime} for this configuration - * instance + * Sets the value for the {@code softMinEvictableIdleTime} configuration attribute for pools created with this configuration instance. * + * @param softMinEvictableIdleTimeMillis The new setting of {@code softMinEvictableIdleTime} for this configuration instance * @see GenericObjectPool#getSoftMinEvictableIdleDuration() * @see GenericKeyedObjectPool#getSoftMinEvictableIdleDuration() * @deprecated Use {@link #setSoftMinEvictableIdleTime(Duration)}. */ @Deprecated - public void setSoftMinEvictableIdleTimeMillis( - final long softMinEvictableIdleTimeMillis) { + public void setSoftMinEvictableIdleTimeMillis(final long softMinEvictableIdleTimeMillis) { setSoftMinEvictableIdleTime(Duration.ofMillis(softMinEvictableIdleTimeMillis)); } /** - * Sets the value for the {@code testOnBorrow} configuration attribute for - * pools created with this configuration instance. - * - * @param testOnBorrow The new setting of {@code testOnBorrow} - * for this configuration instance + * Sets the value for the {@code testOnBorrow} configuration attribute for pools created with this configuration instance. * + * @param testOnBorrow The new setting of {@code testOnBorrow} for this configuration instance * @see GenericObjectPool#getTestOnBorrow() * @see GenericKeyedObjectPool#getTestOnBorrow() */ @@ -972,15 +835,11 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Sets the value for the {@code testOnCreate} configuration attribute for - * pools created with this configuration instance. - * - * @param testOnCreate The new setting of {@code testOnCreate} - * for this configuration instance + * Sets the value for the {@code testOnCreate} configuration attribute for pools created with this configuration instance. * + * @param testOnCreate The new setting of {@code testOnCreate} for this configuration instance * @see GenericObjectPool#getTestOnCreate() * @see GenericKeyedObjectPool#getTestOnCreate() - * * @since 2.2 */ public void setTestOnCreate(final boolean testOnCreate) { @@ -988,12 +847,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Sets the value for the {@code testOnReturn} configuration attribute for - * pools created with this configuration instance. - * - * @param testOnReturn The new setting of {@code testOnReturn} - * for this configuration instance + * Sets the value for the {@code testOnReturn} configuration attribute for pools created with this configuration instance. * + * @param testOnReturn The new setting of {@code testOnReturn} for this configuration instance * @see GenericObjectPool#getTestOnReturn() * @see GenericKeyedObjectPool#getTestOnReturn() */ @@ -1002,12 +858,9 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Sets the value for the {@code testWhileIdle} configuration attribute for - * pools created with this configuration instance. - * - * @param testWhileIdle The new setting of {@code testWhileIdle} - * for this configuration instance + * Sets the value for the {@code testWhileIdle} configuration attribute for pools created with this configuration instance. * + * @param testWhileIdle The new setting of {@code testWhileIdle} for this configuration instance * @see GenericObjectPool#getTestWhileIdle() * @see GenericKeyedObjectPool#getTestWhileIdle() */ @@ -1016,29 +869,21 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon } /** - * Sets the value for the {@code timeBetweenEvictionRuns} configuration - * attribute for pools created with this configuration instance. - * - * @param timeBetweenEvictionRuns The new setting of - * {@code timeBetweenEvictionRuns} for this configuration - * instance + * Sets the value for the {@code timeBetweenEvictionRuns} configuration attribute for pools created with this configuration instance. * + * @param timeBetweenEvictionRuns The new setting of {@code timeBetweenEvictionRuns} for this configuration instance * @see GenericObjectPool#getDurationBetweenEvictionRuns() * @see GenericKeyedObjectPool#getDurationBetweenEvictionRuns() * @since 2.10.0 */ public void setTimeBetweenEvictionRuns(final Duration timeBetweenEvictionRuns) { - this.durationBetweenEvictionRuns = PoolImplUtils.nonNull(timeBetweenEvictionRuns, DEFAULT_TIME_BETWEEN_EVICTION_RUNS); + this.durationBetweenEvictionRuns = PoolImplUtils.nonNull(timeBetweenEvictionRuns, DEFAULT_DURATION_BETWEEN_EVICTION_RUNS); } /** - * Sets the value for the {@code timeBetweenEvictionRuns} configuration - * attribute for pools created with this configuration instance. - * - * @param timeBetweenEvictionRunsMillis The new setting of - * {@code timeBetweenEvictionRuns} for this configuration - * instance + * Sets the value for the {@code timeBetweenEvictionRuns} configuration attribute for pools created with this configuration instance. * + * @param timeBetweenEvictionRunsMillis The new setting of {@code timeBetweenEvictionRuns} for this configuration instance * @see GenericObjectPool#getDurationBetweenEvictionRuns() * @see GenericKeyedObjectPool#getDurationBetweenEvictionRuns() * @deprecated Use {@link #setTimeBetweenEvictionRuns(Duration)}. diff --git a/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java b/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java index 408162c0..23dc741f 100644 --- a/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java +++ b/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java @@ -1407,7 +1407,7 @@ public class TestGenericKeyedObjectPool extends AbstractTestKeyedObjectPool { assertEquals(Boolean.valueOf(BaseObjectPoolConfig.DEFAULT_TEST_WHILE_IDLE), Boolean.valueOf(objPool.getTestWhileIdle())); // - assertEquals(BaseObjectPoolConfig.DEFAULT_TIME_BETWEEN_EVICTION_RUNS, + assertEquals(BaseObjectPoolConfig.DEFAULT_DURATION_BETWEEN_EVICTION_RUNS, objPool.getDurationBetweenEvictionRuns()); assertEquals(BaseObjectPoolConfig.DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS, objPool.getTimeBetweenEvictionRunsMillis()); diff --git a/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java b/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java index 251457eb..01a1945b 100644 --- a/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java +++ b/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java @@ -1352,7 +1352,7 @@ public class TestGenericObjectPool extends TestBaseObjectPool { Boolean.valueOf(dummyPool.getTestOnReturn())); assertEquals(Boolean.valueOf(BaseObjectPoolConfig.DEFAULT_TEST_WHILE_IDLE), Boolean.valueOf(dummyPool.getTestWhileIdle())); - assertEquals(BaseObjectPoolConfig.DEFAULT_TIME_BETWEEN_EVICTION_RUNS, + assertEquals(BaseObjectPoolConfig.DEFAULT_DURATION_BETWEEN_EVICTION_RUNS, dummyPool.getDurationBetweenEvictionRuns()); assertEquals(BaseObjectPoolConfig.DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS, dummyPool.getTimeBetweenEvictionRunsMillis());