public class GenericObjectPoolConfig extends BaseObjectPoolConfig
GenericObjectPool
.
This class is not thread-safe; it is only intended to be used to provide attributes used when creating a pool.
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_IDLE
The default value for the
maxIdle configuration attribute. |
static int |
DEFAULT_MAX_TOTAL
The default value for the
maxTotal configuration attribute. |
static int |
DEFAULT_MIN_IDLE
The default value for the
minIdle configuration attribute. |
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 and Description |
---|
GenericObjectPoolConfig() |
Modifier and Type | Method and Description |
---|---|
GenericObjectPoolConfig |
clone() |
int |
getMaxIdle()
Get the value for the
maxIdle configuration attribute
for pools created with this configuration instance. |
int |
getMaxTotal()
Get the value for the
maxTotal configuration attribute
for pools created with this configuration instance. |
int |
getMinIdle()
Get the value for the
minIdle configuration attribute
for pools created with this configuration instance. |
void |
setMaxIdle(int maxIdle)
Set the value for the
maxIdle configuration attribute for
pools created with this configuration instance. |
void |
setMaxTotal(int maxTotal)
Set the value for the
maxTotal configuration attribute for
pools created with this configuration instance. |
void |
setMinIdle(int minIdle)
Set the value for the
minIdle configuration attribute for
pools created with this configuration instance. |
protected void |
toStringAppendFields(StringBuilder builder)
Used by sub-classes to include the fields defined by the sub-class in the
BaseObject.toString() output. |
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
toString
public static final int DEFAULT_MAX_TOTAL
maxTotal
configuration attribute.public static final int DEFAULT_MAX_IDLE
maxIdle
configuration attribute.public static final int DEFAULT_MIN_IDLE
minIdle
configuration attribute.public int getMaxTotal()
maxTotal
configuration attribute
for pools created with this configuration instance.maxTotal
for this
configuration instanceBaseGenericObjectPool.getMaxTotal()
public void setMaxTotal(int maxTotal)
maxTotal
configuration attribute for
pools created with this configuration instance.maxTotal
- The new setting of maxTotal
for this configuration instanceBaseGenericObjectPool.setMaxTotal(int)
public int getMaxIdle()
maxIdle
configuration attribute
for pools created with this configuration instance.maxIdle
for this
configuration instanceGenericObjectPool.getMaxIdle()
public void setMaxIdle(int maxIdle)
maxIdle
configuration attribute for
pools created with this configuration instance.maxIdle
- The new setting of maxIdle
for this configuration instanceGenericObjectPool.setMaxIdle(int)
public int getMinIdle()
minIdle
configuration attribute
for pools created with this configuration instance.minIdle
for this
configuration instanceGenericObjectPool.getMinIdle()
public void setMinIdle(int minIdle)
minIdle
configuration attribute for
pools created with this configuration instance.minIdle
- The new setting of minIdle
for this configuration instanceGenericObjectPool.setMinIdle(int)
public GenericObjectPoolConfig clone()
protected void toStringAppendFields(StringBuilder builder)
BaseObject
BaseObject.toString()
output.toStringAppendFields
in class BaseObjectPoolConfig
builder
- Field names and values are appended to this objectCopyright © 2000-2016 Apache Software Foundation. All Rights Reserved.