Package org.apache.commons.pool2.impl
Class GenericObjectPoolConfig
java.lang.Object
org.apache.commons.pool2.impl.BaseObjectPoolConfig
org.apache.commons.pool2.impl.GenericObjectPoolConfig
- All Implemented Interfaces:
Cloneable
A simple "struct" encapsulating the configuration for a
GenericObjectPool.
This class is not thread-safe; it is only intended to be used to provide attributes used when creating a pool.
- Since:
- 2.0
- Version:
- $Revision: $
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe default value for themaxIdleconfiguration attribute.static final intThe default value for themaxTotalconfiguration attribute.static final intThe default value for theminIdleconfiguration attribute.Fields inherited from class org.apache.commons.pool2.impl.BaseObjectPoolConfig
DEFAULT_BLOCK_WHEN_EXHAUSTED, DEFAULT_EVICTION_POLICY_CLASS_NAME, DEFAULT_FAIRNESS, DEFAULT_JMX_ENABLE, DEFAULT_JMX_NAME_BASE, DEFAULT_JMX_NAME_PREFIX, DEFAULT_LIFO, DEFAULT_MAX_WAIT_MILLIS, DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS, DEFAULT_NUM_TESTS_PER_EVICTION_RUN, DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME_MILLIS, DEFAULT_TEST_ON_BORROW, DEFAULT_TEST_ON_CREATE, DEFAULT_TEST_ON_RETURN, DEFAULT_TEST_WHILE_IDLE, DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()intGet the value for themaxIdleconfiguration attribute for pools created with this configuration instance.intGet the value for themaxTotalconfiguration attribute for pools created with this configuration instance.intGet the value for theminIdleconfiguration attribute for pools created with this configuration instance.voidsetMaxIdle(int maxIdle) Set the value for themaxIdleconfiguration attribute for pools created with this configuration instance.voidsetMaxTotal(int maxTotal) Set the value for themaxTotalconfiguration attribute for pools created with this configuration instance.voidsetMinIdle(int minIdle) Set the value for theminIdleconfiguration attribute for pools created with this configuration instance.Methods inherited from class org.apache.commons.pool2.impl.BaseObjectPoolConfig
getBlockWhenExhausted, getEvictionPolicyClassName, getFairness, getJmxEnabled, getJmxNameBase, getJmxNamePrefix, getLifo, getMaxWaitMillis, getMinEvictableIdleTimeMillis, getNumTestsPerEvictionRun, getSoftMinEvictableIdleTimeMillis, getTestOnBorrow, getTestOnCreate, getTestOnReturn, getTestWhileIdle, getTimeBetweenEvictionRunsMillis, setBlockWhenExhausted, setEvictionPolicyClassName, setFairness, setJmxEnabled, setJmxNameBase, setJmxNamePrefix, setLifo, setMaxWaitMillis, setMinEvictableIdleTimeMillis, setNumTestsPerEvictionRun, setSoftMinEvictableIdleTimeMillis, setTestOnBorrow, setTestOnCreate, setTestOnReturn, setTestWhileIdle, setTimeBetweenEvictionRunsMillis
-
Field Details
-
DEFAULT_MAX_TOTAL
public static final int DEFAULT_MAX_TOTALThe default value for themaxTotalconfiguration attribute.- See Also:
-
DEFAULT_MAX_IDLE
public static final int DEFAULT_MAX_IDLEThe default value for themaxIdleconfiguration attribute.- See Also:
-
DEFAULT_MIN_IDLE
public static final int DEFAULT_MIN_IDLEThe default value for theminIdleconfiguration attribute.- See Also:
-
-
Constructor Details
-
GenericObjectPoolConfig
public GenericObjectPoolConfig()
-
-
Method Details
-
getMaxTotal
public int getMaxTotal()Get the value for themaxTotalconfiguration attribute for pools created with this configuration instance.- Returns:
- The current setting of
maxTotalfor this configuration instance - See Also:
-
setMaxTotal
public void setMaxTotal(int maxTotal) Set the value for themaxTotalconfiguration attribute for pools created with this configuration instance.- Parameters:
maxTotal- The new setting ofmaxTotalfor this configuration instance- See Also:
-
getMaxIdle
public int getMaxIdle()Get the value for themaxIdleconfiguration attribute for pools created with this configuration instance.- Returns:
- The current setting of
maxIdlefor this configuration instance - See Also:
-
setMaxIdle
public void setMaxIdle(int maxIdle) Set the value for themaxIdleconfiguration attribute for pools created with this configuration instance.- Parameters:
maxIdle- The new setting ofmaxIdlefor this configuration instance- See Also:
-
getMinIdle
public int getMinIdle()Get the value for theminIdleconfiguration attribute for pools created with this configuration instance.- Returns:
- The current setting of
minIdlefor this configuration instance - See Also:
-
setMinIdle
public void setMinIdle(int minIdle) Set the value for theminIdleconfiguration attribute for pools created with this configuration instance.- Parameters:
minIdle- The new setting ofminIdlefor this configuration instance- See Also:
-
clone
-