Class BaseObjectPoolConfig<T>
- java.lang.Object
-
- org.apache.tomcat.dbcp.pool2.BaseObject
-
- org.apache.tomcat.dbcp.pool2.impl.BaseObjectPoolConfig<T>
-
- Type Parameters:
T
- Type of element pooled.
- All Implemented Interfaces:
java.lang.Cloneable
- Direct Known Subclasses:
GenericKeyedObjectPoolConfig
,GenericObjectPoolConfig
public abstract class BaseObjectPoolConfig<T> extends BaseObject implements java.lang.Cloneable
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.This class is not thread-safe.
- Since:
- 2.0
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
DEFAULT_BLOCK_WHEN_EXHAUSTED
The default value for theblockWhenExhausted
configuration attribute.static java.lang.String
DEFAULT_EVICTION_POLICY_CLASS_NAME
The default value for theevictionPolicyClassName
configuration attribute.static java.time.Duration
DEFAULT_EVICTOR_SHUTDOWN_TIMEOUT
The default value forevictorShutdownTimeout
configuration attribute.static long
DEFAULT_EVICTOR_SHUTDOWN_TIMEOUT_MILLIS
Deprecated.static boolean
DEFAULT_FAIRNESS
The default value for thefairness
configuration attribute.static boolean
DEFAULT_JMX_ENABLE
The default value for enabling JMX for pools created with a configuration instance.static java.lang.String
DEFAULT_JMX_NAME_BASE
The default value for the base name to use to name JMX enabled pools created with a configuration instance.static java.lang.String
DEFAULT_JMX_NAME_PREFIX
The default value for the prefix used to name JMX enabled pools created with a configuration instance.static boolean
DEFAULT_LIFO
The default value for thelifo
configuration attribute.static java.time.Duration
DEFAULT_MAX_WAIT
The default value for themaxWait
configuration attribute.static long
DEFAULT_MAX_WAIT_MILLIS
Deprecated.UseDEFAULT_MAX_WAIT
.static java.time.Duration
DEFAULT_MIN_EVICTABLE_IDLE_DURATION
The default value for theminEvictableIdleDuration
configuration attribute.static java.time.Duration
DEFAULT_MIN_EVICTABLE_IDLE_TIME
Deprecated.static long
DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS
Deprecated.static int
DEFAULT_NUM_TESTS_PER_EVICTION_RUN
The default value for thenumTestsPerEvictionRun
configuration attribute.static java.time.Duration
DEFAULT_SOFT_MIN_EVICTABLE_IDLE_DURATION
The default value for thesoftMinEvictableIdleTime
configuration attribute.static java.time.Duration
DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME
Deprecated.static long
DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME_MILLIS
Deprecated.static boolean
DEFAULT_TEST_ON_BORROW
The default value for thetestOnBorrow
configuration attribute.static boolean
DEFAULT_TEST_ON_CREATE
The default value for thetestOnCreate
configuration attribute.static boolean
DEFAULT_TEST_ON_RETURN
The default value for thetestOnReturn
configuration attribute.static boolean
DEFAULT_TEST_WHILE_IDLE
The default value for thetestWhileIdle
configuration attribute.static java.time.Duration
DEFAULT_TIME_BETWEEN_EVICTION_RUNS
The default value for thetimeBetweenEvictionRuns
configuration attribute.static long
DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS
Deprecated.
-
Constructor Summary
Constructors Constructor Description BaseObjectPoolConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
getBlockWhenExhausted()
Gets the value for theblockWhenExhausted
configuration attribute for pools created with this configuration instance.java.time.Duration
getDurationBetweenEvictionRuns()
Gets the value for thetimeBetweenEvictionRuns
configuration attribute for pools created with this configuration instance.EvictionPolicy<T>
getEvictionPolicy()
Gets the value for theevictionPolicyClass
configuration attribute for pools created with this configuration instance.java.lang.String
getEvictionPolicyClassName()
Gets the value for theevictionPolicyClassName
configuration attribute for pools created with this configuration instance.java.time.Duration
getEvictorShutdownTimeout()
Deprecated.java.time.Duration
getEvictorShutdownTimeoutDuration()
Gets the value for theevictorShutdownTimeout
configuration attribute for pools created with this configuration instance.long
getEvictorShutdownTimeoutMillis()
Deprecated.boolean
getFairness()
Gets the value for thefairness
configuration attribute for pools created with this configuration instance.boolean
getJmxEnabled()
Gets the value of the flag that determines if JMX will be enabled for pools created with this configuration instance.java.lang.String
getJmxNameBase()
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.java.lang.String
getJmxNamePrefix()
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.boolean
getLifo()
Gets the value for thelifo
configuration attribute for pools created with this configuration instance.java.time.Duration
getMaxWaitDuration()
Gets the value for themaxWait
configuration attribute for pools created with this configuration instance.long
getMaxWaitMillis()
Deprecated.UsegetMaxWaitDuration()
.java.time.Duration
getMinEvictableIdleDuration()
Gets the value for theminEvictableIdleTime
configuration attribute for pools created with this configuration instance.java.time.Duration
getMinEvictableIdleTime()
Deprecated.long
getMinEvictableIdleTimeMillis()
Deprecated.int
getNumTestsPerEvictionRun()
Gets the value for thenumTestsPerEvictionRun
configuration attribute for pools created with this configuration instance.java.time.Duration
getSoftMinEvictableIdleDuration()
Gets the value for thesoftMinEvictableIdleTime
configuration attribute for pools created with this configuration instance.java.time.Duration
getSoftMinEvictableIdleTime()
Deprecated.long
getSoftMinEvictableIdleTimeMillis()
Deprecated.boolean
getTestOnBorrow()
Gets the value for thetestOnBorrow
configuration attribute for pools created with this configuration instance.boolean
getTestOnCreate()
Gets the value for thetestOnCreate
configuration attribute for pools created with this configuration instance.boolean
getTestOnReturn()
Gets the value for thetestOnReturn
configuration attribute for pools created with this configuration instance.boolean
getTestWhileIdle()
Gets the value for thetestWhileIdle
configuration attribute for pools created with this configuration instance.java.time.Duration
getTimeBetweenEvictionRuns()
Deprecated.long
getTimeBetweenEvictionRunsMillis()
Deprecated.void
setBlockWhenExhausted(boolean blockWhenExhausted)
Sets the value for theblockWhenExhausted
configuration attribute for pools created with this configuration instance.void
setEvictionPolicy(EvictionPolicy<T> evictionPolicy)
Sets the value for theevictionPolicyClass
configuration attribute for pools created with this configuration instance.void
setEvictionPolicyClassName(java.lang.String evictionPolicyClassName)
Sets the value for theevictionPolicyClassName
configuration attribute for pools created with this configuration instance.void
setEvictorShutdownTimeout(java.time.Duration evictorShutdownTimeoutDuration)
Sets the value for theevictorShutdownTimeout
configuration attribute for pools created with this configuration instance.void
setEvictorShutdownTimeoutMillis(long evictorShutdownTimeoutMillis)
Deprecated.void
setEvictorShutdownTimeoutMillis(java.time.Duration evictorShutdownTimeout)
Deprecated.void
setFairness(boolean fairness)
Sets the value for thefairness
configuration attribute for pools created with this configuration instance.void
setJmxEnabled(boolean jmxEnabled)
Sets the value of the flag that determines if JMX will be enabled for pools created with this configuration instance.void
setJmxNameBase(java.lang.String jmxNameBase)
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.void
setJmxNamePrefix(java.lang.String jmxNamePrefix)
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.void
setLifo(boolean lifo)
Sets the value for thelifo
configuration attribute for pools created with this configuration instance.void
setMaxWait(java.time.Duration maxWaitDuration)
Sets the value for themaxWait
configuration attribute for pools created with this configuration instance.void
setMaxWaitMillis(long maxWaitMillis)
Deprecated.UsesetMaxWait(Duration)
.void
setMinEvictableIdleTime(java.time.Duration minEvictableIdleTime)
Sets the value for theminEvictableIdleTime
configuration attribute for pools created with this configuration instance.void
setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis)
Deprecated.void
setNumTestsPerEvictionRun(int numTestsPerEvictionRun)
Sets the value for thenumTestsPerEvictionRun
configuration attribute for pools created with this configuration instance.void
setSoftMinEvictableIdleTime(java.time.Duration softMinEvictableIdleTime)
Sets the value for thesoftMinEvictableIdleTime
configuration attribute for pools created with this configuration instance.void
setSoftMinEvictableIdleTimeMillis(long softMinEvictableIdleTimeMillis)
Deprecated.void
setTestOnBorrow(boolean testOnBorrow)
Sets the value for thetestOnBorrow
configuration attribute for pools created with this configuration instance.void
setTestOnCreate(boolean testOnCreate)
Sets the value for thetestOnCreate
configuration attribute for pools created with this configuration instance.void
setTestOnReturn(boolean testOnReturn)
Sets the value for thetestOnReturn
configuration attribute for pools created with this configuration instance.void
setTestWhileIdle(boolean testWhileIdle)
Sets the value for thetestWhileIdle
configuration attribute for pools created with this configuration instance.void
setTimeBetweenEvictionRuns(java.time.Duration timeBetweenEvictionRuns)
Sets the value for thetimeBetweenEvictionRuns
configuration attribute for pools created with this configuration instance.void
setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis)
Deprecated.protected void
toStringAppendFields(java.lang.StringBuilder builder)
Used by sub-classes to include the fields defined by the sub-class in theBaseObject.toString()
output.-
Methods inherited from class org.apache.tomcat.dbcp.pool2.BaseObject
toString
-
-
-
-
Field Detail
-
DEFAULT_LIFO
public static final boolean DEFAULT_LIFO
The default value for thelifo
configuration attribute.
-
DEFAULT_FAIRNESS
public static final boolean DEFAULT_FAIRNESS
The default value for thefairness
configuration attribute.
-
DEFAULT_MAX_WAIT_MILLIS
@Deprecated public static final long DEFAULT_MAX_WAIT_MILLIS
Deprecated.UseDEFAULT_MAX_WAIT
.The default value for themaxWait
configuration attribute.
-
DEFAULT_MAX_WAIT
public static final java.time.Duration DEFAULT_MAX_WAIT
The default value for themaxWait
configuration attribute.- Since:
- 2.10.0
- See Also:
BaseGenericObjectPool.getMaxWaitDuration()
,BaseGenericObjectPool.getMaxWaitDuration()
-
DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS
@Deprecated public static final long DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS
Deprecated.The default value for theminEvictableIdleDuration
configuration attribute.
-
DEFAULT_MIN_EVICTABLE_IDLE_DURATION
public static final java.time.Duration DEFAULT_MIN_EVICTABLE_IDLE_DURATION
The default value for theminEvictableIdleDuration
configuration attribute.- Since:
- 2.11.0
- See Also:
BaseGenericObjectPool.getMinEvictableIdleDuration()
,BaseGenericObjectPool.getMinEvictableIdleDuration()
-
DEFAULT_MIN_EVICTABLE_IDLE_TIME
@Deprecated public static final java.time.Duration DEFAULT_MIN_EVICTABLE_IDLE_TIME
Deprecated.The default value for theminEvictableIdleDuration
configuration attribute.- Since:
- 2.10.0
- See Also:
BaseGenericObjectPool.getMinEvictableIdleDuration()
,BaseGenericObjectPool.getMinEvictableIdleDuration()
-
DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME_MILLIS
@Deprecated public static final long DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME_MILLIS
Deprecated.The default value for thesoftMinEvictableIdleTime
configuration attribute.
-
DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME
@Deprecated public static final java.time.Duration DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME
Deprecated.The default value for thesoftMinEvictableIdleTime
configuration attribute.
-
DEFAULT_SOFT_MIN_EVICTABLE_IDLE_DURATION
public static final java.time.Duration DEFAULT_SOFT_MIN_EVICTABLE_IDLE_DURATION
The default value for thesoftMinEvictableIdleTime
configuration attribute.
-
DEFAULT_EVICTOR_SHUTDOWN_TIMEOUT_MILLIS
@Deprecated public static final long DEFAULT_EVICTOR_SHUTDOWN_TIMEOUT_MILLIS
Deprecated.The default value forevictorShutdownTimeout
configuration attribute.
-
DEFAULT_EVICTOR_SHUTDOWN_TIMEOUT
public static final java.time.Duration DEFAULT_EVICTOR_SHUTDOWN_TIMEOUT
The default value forevictorShutdownTimeout
configuration attribute.
-
DEFAULT_NUM_TESTS_PER_EVICTION_RUN
public static final int DEFAULT_NUM_TESTS_PER_EVICTION_RUN
The default value for thenumTestsPerEvictionRun
configuration attribute.
-
DEFAULT_TEST_ON_CREATE
public static final boolean DEFAULT_TEST_ON_CREATE
The default value for thetestOnCreate
configuration attribute.- Since:
- 2.2
- See Also:
BaseGenericObjectPool.getTestOnCreate()
,BaseGenericObjectPool.getTestOnCreate()
, Constant Field Values
-
DEFAULT_TEST_ON_BORROW
public static final boolean DEFAULT_TEST_ON_BORROW
The default value for thetestOnBorrow
configuration attribute.
-
DEFAULT_TEST_ON_RETURN
public static final boolean DEFAULT_TEST_ON_RETURN
The default value for thetestOnReturn
configuration attribute.
-
DEFAULT_TEST_WHILE_IDLE
public static final boolean DEFAULT_TEST_WHILE_IDLE
The default value for thetestWhileIdle
configuration attribute.
-
DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS
@Deprecated public static final long DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS
Deprecated.The default value for thetimeBetweenEvictionRuns
configuration attribute.
-
DEFAULT_TIME_BETWEEN_EVICTION_RUNS
public static final java.time.Duration DEFAULT_TIME_BETWEEN_EVICTION_RUNS
The default value for thetimeBetweenEvictionRuns
configuration attribute.
-
DEFAULT_BLOCK_WHEN_EXHAUSTED
public static final boolean DEFAULT_BLOCK_WHEN_EXHAUSTED
The default value for theblockWhenExhausted
configuration attribute.
-
DEFAULT_JMX_ENABLE
public static final boolean DEFAULT_JMX_ENABLE
The default value for enabling JMX for pools created with a configuration instance.- See Also:
- Constant Field Values
-
DEFAULT_JMX_NAME_PREFIX
public static final java.lang.String DEFAULT_JMX_NAME_PREFIX
The default value for the prefix used to name JMX enabled pools created with a configuration instance.
-
DEFAULT_JMX_NAME_BASE
public static final java.lang.String DEFAULT_JMX_NAME_BASE
The default value for the base name to use to name JMX enabled pools created with a configuration instance. The default isnull
which means the pool will provide the base name to use.
-
DEFAULT_EVICTION_POLICY_CLASS_NAME
public static final java.lang.String DEFAULT_EVICTION_POLICY_CLASS_NAME
The default value for theevictionPolicyClassName
configuration attribute.
-
-
Method Detail
-
getBlockWhenExhausted
public boolean getBlockWhenExhausted()
Gets the value for theblockWhenExhausted
configuration attribute for pools created with this configuration instance.- Returns:
- The current setting of
blockWhenExhausted
for this configuration instance - See Also:
BaseGenericObjectPool.getBlockWhenExhausted()
,BaseGenericObjectPool.getBlockWhenExhausted()
-
getDurationBetweenEvictionRuns
public java.time.Duration getDurationBetweenEvictionRuns()
Gets the value for thetimeBetweenEvictionRuns
configuration attribute for pools created with this configuration instance.- Returns:
- The current setting of
timeBetweenEvictionRuns
for this configuration instance - Since:
- 2.11.0
- See Also:
BaseGenericObjectPool.getDurationBetweenEvictionRuns()
,BaseGenericObjectPool.getDurationBetweenEvictionRuns()
-
getEvictionPolicy
public EvictionPolicy<T> getEvictionPolicy()
Gets the value for theevictionPolicyClass
configuration attribute for pools created with this configuration instance.- Returns:
- The current setting of
evictionPolicyClass
for this configuration instance - Since:
- 2.6.0
- See Also:
BaseGenericObjectPool.getEvictionPolicy()
,BaseGenericObjectPool.getEvictionPolicy()
-
getEvictionPolicyClassName
public java.lang.String getEvictionPolicyClassName()
Gets the value for theevictionPolicyClassName
configuration attribute for pools created with this configuration instance.- Returns:
- The current setting of
evictionPolicyClassName
for this configuration instance - See Also:
BaseGenericObjectPool.getEvictionPolicyClassName()
,BaseGenericObjectPool.getEvictionPolicyClassName()
-
getEvictorShutdownTimeout
@Deprecated public java.time.Duration getEvictorShutdownTimeout()
Deprecated.Gets the value for theevictorShutdownTimeout
configuration attribute for pools created with this configuration instance.- Returns:
- The current setting of
evictorShutdownTimeout
for this configuration instance - Since:
- 2.10.0
- See Also:
BaseGenericObjectPool.getEvictorShutdownTimeoutDuration()
,BaseGenericObjectPool.getEvictorShutdownTimeoutDuration()
-
getEvictorShutdownTimeoutDuration
public java.time.Duration getEvictorShutdownTimeoutDuration()
Gets the value for theevictorShutdownTimeout
configuration attribute for pools created with this configuration instance.- Returns:
- The current setting of
evictorShutdownTimeout
for this configuration instance - Since:
- 2.11.0
- See Also:
BaseGenericObjectPool.getEvictorShutdownTimeoutDuration()
,BaseGenericObjectPool.getEvictorShutdownTimeoutDuration()
-
getEvictorShutdownTimeoutMillis
@Deprecated public long getEvictorShutdownTimeoutMillis()
Deprecated.Gets the value for theevictorShutdownTimeout
configuration attribute for pools created with this configuration instance.- Returns:
- The current setting of
evictorShutdownTimeout
for this configuration instance - See Also:
BaseGenericObjectPool.getEvictorShutdownTimeoutDuration()
,BaseGenericObjectPool.getEvictorShutdownTimeoutDuration()
-
getFairness
public boolean getFairness()
Gets the value for thefairness
configuration attribute for pools created with this configuration instance.- Returns:
- The current setting of
fairness
for this configuration instance - See Also:
BaseGenericObjectPool.getFairness()
,BaseGenericObjectPool.getFairness()
-
getJmxEnabled
public boolean getJmxEnabled()
Gets the value of the flag that determines if JMX will be enabled for pools created with this configuration instance.- Returns:
- The current setting of
jmxEnabled
for this configuration instance
-
getJmxNameBase
public java.lang.String getJmxNameBase()
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 ofnull
means that the pool will define the JMX name base.- Returns:
- The current setting of
jmxNameBase
for this configuration instance
-
getJmxNamePrefix
public java.lang.String getJmxNamePrefix()
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.- Returns:
- The current setting of
jmxNamePrefix
for this configuration instance
-
getLifo
public boolean getLifo()
Gets the value for thelifo
configuration attribute for pools created with this configuration instance.- Returns:
- The current setting of
lifo
for this configuration instance - See Also:
BaseGenericObjectPool.getLifo()
,BaseGenericObjectPool.getLifo()
-
getMaxWaitDuration
public java.time.Duration getMaxWaitDuration()
Gets the value for themaxWait
configuration attribute for pools created with this configuration instance.- Returns:
- The current setting of
maxWait
for this configuration instance - Since:
- 2.11.0
- See Also:
BaseGenericObjectPool.getMaxWaitDuration()
,BaseGenericObjectPool.getMaxWaitDuration()
-
getMaxWaitMillis
@Deprecated public long getMaxWaitMillis()
Deprecated.UsegetMaxWaitDuration()
.Gets the value for themaxWait
configuration attribute for pools created with this configuration instance.- Returns:
- The current setting of
maxWait
for this configuration instance - See Also:
BaseGenericObjectPool.getMaxWaitDuration()
,BaseGenericObjectPool.getMaxWaitDuration()
-
getMinEvictableIdleDuration
public java.time.Duration getMinEvictableIdleDuration()
Gets the value for theminEvictableIdleTime
configuration attribute for pools created with this configuration instance.- Returns:
- The current setting of
minEvictableIdleTime
for this configuration instance - Since:
- 2.11.0
- See Also:
BaseGenericObjectPool.getMinEvictableIdleDuration()
,BaseGenericObjectPool.getMinEvictableIdleDuration()
-
getMinEvictableIdleTime
@Deprecated public java.time.Duration getMinEvictableIdleTime()
Deprecated.Gets the value for theminEvictableIdleTime
configuration attribute for pools created with this configuration instance.- Returns:
- The current setting of
minEvictableIdleTime
for this configuration instance - Since:
- 2.10.0
- See Also:
BaseGenericObjectPool.getMinEvictableIdleDuration()
,BaseGenericObjectPool.getMinEvictableIdleDuration()
-
getMinEvictableIdleTimeMillis
@Deprecated public long getMinEvictableIdleTimeMillis()
Deprecated.Gets the value for theminEvictableIdleTime
configuration attribute for pools created with this configuration instance.- Returns:
- The current setting of
minEvictableIdleTime
for this configuration instance - See Also:
BaseGenericObjectPool.getMinEvictableIdleDuration()
,BaseGenericObjectPool.getMinEvictableIdleDuration()
-
getNumTestsPerEvictionRun
public int getNumTestsPerEvictionRun()
Gets the value for thenumTestsPerEvictionRun
configuration attribute for pools created with this configuration instance.- Returns:
- The current setting of
numTestsPerEvictionRun
for this configuration instance - See Also:
BaseGenericObjectPool.getNumTestsPerEvictionRun()
,BaseGenericObjectPool.getNumTestsPerEvictionRun()
-
getSoftMinEvictableIdleDuration
public java.time.Duration getSoftMinEvictableIdleDuration()
Gets the value for thesoftMinEvictableIdleTime
configuration attribute for pools created with this configuration instance.- Returns:
- The current setting of
softMinEvictableIdleTime
for this configuration instance - Since:
- 2.11.0
- See Also:
BaseGenericObjectPool.getSoftMinEvictableIdleDuration()
,BaseGenericObjectPool.getSoftMinEvictableIdleDuration()
-
getSoftMinEvictableIdleTime
@Deprecated public java.time.Duration getSoftMinEvictableIdleTime()
Deprecated.Gets the value for thesoftMinEvictableIdleTime
configuration attribute for pools created with this configuration instance.- Returns:
- The current setting of
softMinEvictableIdleTime
for this configuration instance - Since:
- 2.10.0
- See Also:
BaseGenericObjectPool.getSoftMinEvictableIdleDuration()
,BaseGenericObjectPool.getSoftMinEvictableIdleDuration()
-
getSoftMinEvictableIdleTimeMillis
@Deprecated public long getSoftMinEvictableIdleTimeMillis()
Deprecated.Gets the value for thesoftMinEvictableIdleTime
configuration attribute for pools created with this configuration instance.- Returns:
- The current setting of
softMinEvictableIdleTime
for this configuration instance - See Also:
BaseGenericObjectPool.getSoftMinEvictableIdleDuration()
,BaseGenericObjectPool.getSoftMinEvictableIdleDuration()
-
getTestOnBorrow
public boolean getTestOnBorrow()
Gets the value for thetestOnBorrow
configuration attribute for pools created with this configuration instance.- Returns:
- The current setting of
testOnBorrow
for this configuration instance - See Also:
BaseGenericObjectPool.getTestOnBorrow()
,BaseGenericObjectPool.getTestOnBorrow()
-
getTestOnCreate
public boolean getTestOnCreate()
Gets the value for thetestOnCreate
configuration attribute for pools created with this configuration instance.- Returns:
- The current setting of
testOnCreate
for this configuration instance - Since:
- 2.2
- See Also:
BaseGenericObjectPool.getTestOnCreate()
,BaseGenericObjectPool.getTestOnCreate()
-
getTestOnReturn
public boolean getTestOnReturn()
Gets the value for thetestOnReturn
configuration attribute for pools created with this configuration instance.- Returns:
- The current setting of
testOnReturn
for this configuration instance - See Also:
BaseGenericObjectPool.getTestOnReturn()
,BaseGenericObjectPool.getTestOnReturn()
-
getTestWhileIdle
public boolean getTestWhileIdle()
Gets the value for thetestWhileIdle
configuration attribute for pools created with this configuration instance.- Returns:
- The current setting of
testWhileIdle
for this configuration instance - See Also:
BaseGenericObjectPool.getTestWhileIdle()
,BaseGenericObjectPool.getTestWhileIdle()
-
getTimeBetweenEvictionRuns
@Deprecated public java.time.Duration getTimeBetweenEvictionRuns()
Deprecated.Gets the value for thetimeBetweenEvictionRuns
configuration attribute for pools created with this configuration instance.- Returns:
- The current setting of
timeBetweenEvictionRuns
for this configuration instance - Since:
- 2.10.0
- See Also:
BaseGenericObjectPool.getDurationBetweenEvictionRuns()
,BaseGenericObjectPool.getDurationBetweenEvictionRuns()
-
getTimeBetweenEvictionRunsMillis
@Deprecated public long getTimeBetweenEvictionRunsMillis()
Deprecated.Gets the value for thetimeBetweenEvictionRuns
configuration attribute for pools created with this configuration instance.- Returns:
- The current setting of
timeBetweenEvictionRuns
for this configuration instance - See Also:
BaseGenericObjectPool.getDurationBetweenEvictionRuns()
,BaseGenericObjectPool.getDurationBetweenEvictionRuns()
-
setBlockWhenExhausted
public void setBlockWhenExhausted(boolean blockWhenExhausted)
Sets the value for theblockWhenExhausted
configuration attribute for pools created with this configuration instance.- Parameters:
blockWhenExhausted
- The new setting ofblockWhenExhausted
for this configuration instance- See Also:
BaseGenericObjectPool.getBlockWhenExhausted()
,BaseGenericObjectPool.getBlockWhenExhausted()
-
setEvictionPolicy
public void setEvictionPolicy(EvictionPolicy<T> evictionPolicy)
Sets the value for theevictionPolicyClass
configuration attribute for pools created with this configuration instance.- Parameters:
evictionPolicy
- The new setting ofevictionPolicyClass
for this configuration instance- Since:
- 2.6.0
- See Also:
BaseGenericObjectPool.getEvictionPolicy()
,BaseGenericObjectPool.getEvictionPolicy()
-
setEvictionPolicyClassName
public void setEvictionPolicyClassName(java.lang.String evictionPolicyClassName)
Sets the value for theevictionPolicyClassName
configuration attribute for pools created with this configuration instance.- Parameters:
evictionPolicyClassName
- The new setting ofevictionPolicyClassName
for this configuration instance- See Also:
BaseGenericObjectPool.getEvictionPolicyClassName()
,BaseGenericObjectPool.getEvictionPolicyClassName()
-
setEvictorShutdownTimeout
public void setEvictorShutdownTimeout(java.time.Duration evictorShutdownTimeoutDuration)
Sets the value for theevictorShutdownTimeout
configuration attribute for pools created with this configuration instance.- Parameters:
evictorShutdownTimeoutDuration
- The new setting ofevictorShutdownTimeout
for this configuration instance- Since:
- 2.11.0
- See Also:
BaseGenericObjectPool.getEvictorShutdownTimeoutDuration()
,BaseGenericObjectPool.getEvictorShutdownTimeoutDuration()
-
setEvictorShutdownTimeoutMillis
@Deprecated public void setEvictorShutdownTimeoutMillis(java.time.Duration evictorShutdownTimeout)
Deprecated.Sets the value for theevictorShutdownTimeout
configuration attribute for pools created with this configuration instance.- Parameters:
evictorShutdownTimeout
- The new setting ofevictorShutdownTimeout
for this configuration instance- Since:
- 2.10.0
- See Also:
BaseGenericObjectPool.getEvictorShutdownTimeoutDuration()
,BaseGenericObjectPool.getEvictorShutdownTimeoutDuration()
-
setEvictorShutdownTimeoutMillis
@Deprecated public void setEvictorShutdownTimeoutMillis(long evictorShutdownTimeoutMillis)
Deprecated.Sets the value for theevictorShutdownTimeout
configuration attribute for pools created with this configuration instance.- Parameters:
evictorShutdownTimeoutMillis
- The new setting ofevictorShutdownTimeout
for this configuration instance- See Also:
BaseGenericObjectPool.getEvictorShutdownTimeoutDuration()
,BaseGenericObjectPool.getEvictorShutdownTimeoutDuration()
-
setFairness
public void setFairness(boolean fairness)
Sets the value for thefairness
configuration attribute for pools created with this configuration instance.- Parameters:
fairness
- The new setting offairness
for this configuration instance- See Also:
BaseGenericObjectPool.getFairness()
,BaseGenericObjectPool.getFairness()
-
setJmxEnabled
public void setJmxEnabled(boolean jmxEnabled)
Sets the value of the flag that determines if JMX will be enabled for pools created with this configuration instance.- Parameters:
jmxEnabled
- The new setting ofjmxEnabled
for this configuration instance
-
setJmxNameBase
public void setJmxNameBase(java.lang.String jmxNameBase)
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 ofnull
means that the pool will define the JMX name base.- Parameters:
jmxNameBase
- The new setting ofjmxNameBase
for this configuration instance
-
setJmxNamePrefix
public void setJmxNamePrefix(java.lang.String jmxNamePrefix)
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.- Parameters:
jmxNamePrefix
- The new setting ofjmxNamePrefix
for this configuration instance
-
setLifo
public void setLifo(boolean lifo)
Sets the value for thelifo
configuration attribute for pools created with this configuration instance.- Parameters:
lifo
- The new setting oflifo
for this configuration instance- See Also:
BaseGenericObjectPool.getLifo()
,BaseGenericObjectPool.getLifo()
-
setMaxWait
public void setMaxWait(java.time.Duration maxWaitDuration)
Sets the value for themaxWait
configuration attribute for pools created with this configuration instance.- Parameters:
maxWaitDuration
- The new setting ofmaxWaitDuration
for this configuration instance- Since:
- 2.11.0
- See Also:
BaseGenericObjectPool.getMaxWaitDuration()
,BaseGenericObjectPool.getMaxWaitDuration()
-
setMaxWaitMillis
@Deprecated public void setMaxWaitMillis(long maxWaitMillis)
Deprecated.UsesetMaxWait(Duration)
.Sets the value for themaxWait
configuration attribute for pools created with this configuration instance.- Parameters:
maxWaitMillis
- The new setting ofmaxWaitMillis
for this configuration instance- See Also:
BaseGenericObjectPool.getMaxWaitDuration()
,BaseGenericObjectPool.getMaxWaitDuration()
-
setMinEvictableIdleTime
public void setMinEvictableIdleTime(java.time.Duration minEvictableIdleTime)
Sets the value for theminEvictableIdleTime
configuration attribute for pools created with this configuration instance.- Parameters:
minEvictableIdleTime
- The new setting ofminEvictableIdleTime
for this configuration instance- Since:
- 2.10.0
- See Also:
BaseGenericObjectPool.getMinEvictableIdleDuration()
,BaseGenericObjectPool.getMinEvictableIdleDuration()
-
setMinEvictableIdleTimeMillis
@Deprecated public void setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis)
Deprecated.Sets the value for theminEvictableIdleTime
configuration attribute for pools created with this configuration instance.- Parameters:
minEvictableIdleTimeMillis
- The new setting ofminEvictableIdleTime
for this configuration instance- See Also:
BaseGenericObjectPool.getMinEvictableIdleDuration()
,BaseGenericObjectPool.getMinEvictableIdleDuration()
-
setNumTestsPerEvictionRun
public void setNumTestsPerEvictionRun(int numTestsPerEvictionRun)
Sets the value for thenumTestsPerEvictionRun
configuration attribute for pools created with this configuration instance.- Parameters:
numTestsPerEvictionRun
- The new setting ofnumTestsPerEvictionRun
for this configuration instance- See Also:
BaseGenericObjectPool.getNumTestsPerEvictionRun()
,BaseGenericObjectPool.getNumTestsPerEvictionRun()
-
setSoftMinEvictableIdleTime
public void setSoftMinEvictableIdleTime(java.time.Duration softMinEvictableIdleTime)
Sets the value for thesoftMinEvictableIdleTime
configuration attribute for pools created with this configuration instance.- Parameters:
softMinEvictableIdleTime
- The new setting ofsoftMinEvictableIdleTime
for this configuration instance- Since:
- 2.10.0
- See Also:
BaseGenericObjectPool.getSoftMinEvictableIdleDuration()
,BaseGenericObjectPool.getSoftMinEvictableIdleDuration()
-
setSoftMinEvictableIdleTimeMillis
@Deprecated public void setSoftMinEvictableIdleTimeMillis(long softMinEvictableIdleTimeMillis)
Deprecated.Sets the value for thesoftMinEvictableIdleTime
configuration attribute for pools created with this configuration instance.- Parameters:
softMinEvictableIdleTimeMillis
- The new setting ofsoftMinEvictableIdleTime
for this configuration instance- See Also:
BaseGenericObjectPool.getSoftMinEvictableIdleDuration()
,BaseGenericObjectPool.getSoftMinEvictableIdleDuration()
-
setTestOnBorrow
public void setTestOnBorrow(boolean testOnBorrow)
Sets the value for thetestOnBorrow
configuration attribute for pools created with this configuration instance.- Parameters:
testOnBorrow
- The new setting oftestOnBorrow
for this configuration instance- See Also:
BaseGenericObjectPool.getTestOnBorrow()
,BaseGenericObjectPool.getTestOnBorrow()
-
setTestOnCreate
public void setTestOnCreate(boolean testOnCreate)
Sets the value for thetestOnCreate
configuration attribute for pools created with this configuration instance.- Parameters:
testOnCreate
- The new setting oftestOnCreate
for this configuration instance- Since:
- 2.2
- See Also:
BaseGenericObjectPool.getTestOnCreate()
,BaseGenericObjectPool.getTestOnCreate()
-
setTestOnReturn
public void setTestOnReturn(boolean testOnReturn)
Sets the value for thetestOnReturn
configuration attribute for pools created with this configuration instance.- Parameters:
testOnReturn
- The new setting oftestOnReturn
for this configuration instance- See Also:
BaseGenericObjectPool.getTestOnReturn()
,BaseGenericObjectPool.getTestOnReturn()
-
setTestWhileIdle
public void setTestWhileIdle(boolean testWhileIdle)
Sets the value for thetestWhileIdle
configuration attribute for pools created with this configuration instance.- Parameters:
testWhileIdle
- The new setting oftestWhileIdle
for this configuration instance- See Also:
BaseGenericObjectPool.getTestWhileIdle()
,BaseGenericObjectPool.getTestWhileIdle()
-
setTimeBetweenEvictionRuns
public void setTimeBetweenEvictionRuns(java.time.Duration timeBetweenEvictionRuns)
Sets the value for thetimeBetweenEvictionRuns
configuration attribute for pools created with this configuration instance.- Parameters:
timeBetweenEvictionRuns
- The new setting oftimeBetweenEvictionRuns
for this configuration instance- Since:
- 2.10.0
- See Also:
BaseGenericObjectPool.getDurationBetweenEvictionRuns()
,BaseGenericObjectPool.getDurationBetweenEvictionRuns()
-
setTimeBetweenEvictionRunsMillis
@Deprecated public void setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis)
Deprecated.Sets the value for thetimeBetweenEvictionRuns
configuration attribute for pools created with this configuration instance.- Parameters:
timeBetweenEvictionRunsMillis
- The new setting oftimeBetweenEvictionRuns
for this configuration instance- See Also:
BaseGenericObjectPool.getDurationBetweenEvictionRuns()
,BaseGenericObjectPool.getDurationBetweenEvictionRuns()
-
toStringAppendFields
protected void toStringAppendFields(java.lang.StringBuilder builder)
Description copied from class:BaseObject
Used by sub-classes to include the fields defined by the sub-class in theBaseObject.toString()
output.- Overrides:
toStringAppendFields
in classBaseObject
- Parameters:
builder
- Field names and values are appended to this object
-
-