T - Type of element pooled.public class GenericKeyedObjectPoolConfig<T> extends BaseObjectPoolConfig<T>
GenericKeyedObjectPool.
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_PER_KEY
The default value for the
maxIdlePerKey configuration attribute. |
static int |
DEFAULT_MAX_TOTAL
The default value for the
maxTotal configuration attribute. |
static int |
DEFAULT_MAX_TOTAL_PER_KEY
The default value for the
maxTotalPerKey configuration attribute. |
static int |
DEFAULT_MIN_IDLE_PER_KEY
The default value for the
minIdlePerKey configuration attribute. |
DEFAULT_BLOCK_WHEN_EXHAUSTED, DEFAULT_EVICTION_POLICY_CLASS_NAME, DEFAULT_EVICTOR_SHUTDOWN_TIMEOUT_MILLIS, 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 |
|---|
GenericKeyedObjectPoolConfig()
Create a new configuration with default settings.
|
| Modifier and Type | Method and Description |
|---|---|
GenericKeyedObjectPoolConfig<T> |
clone() |
int |
getMaxIdlePerKey()
Get the value for the
maxIdlePerKey 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 |
getMaxTotalPerKey()
Get the value for the
maxTotalPerKey configuration attribute
for pools created with this configuration instance. |
int |
getMinIdlePerKey()
Get the value for the
minIdlePerKey configuration attribute
for pools created with this configuration instance. |
void |
setMaxIdlePerKey(int maxIdlePerKey)
Set the value for the
maxIdlePerKey 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 |
setMaxTotalPerKey(int maxTotalPerKey)
Set the value for the
maxTotalPerKey configuration attribute for
pools created with this configuration instance. |
void |
setMinIdlePerKey(int minIdlePerKey)
Set the value for the
minIdlePerKey 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, getEvictionPolicy, getEvictionPolicyClassName, getEvictorShutdownTimeoutMillis, getFairness, getJmxEnabled, getJmxNameBase, getJmxNamePrefix, getLifo, getMaxWaitMillis, getMinEvictableIdleTimeMillis, getNumTestsPerEvictionRun, getSoftMinEvictableIdleTimeMillis, getTestOnBorrow, getTestOnCreate, getTestOnReturn, getTestWhileIdle, getTimeBetweenEvictionRunsMillis, setBlockWhenExhausted, setEvictionPolicy, setEvictionPolicyClassName, setEvictorShutdownTimeoutMillis, setFairness, setJmxEnabled, setJmxNameBase, setJmxNamePrefix, setLifo, setMaxWaitMillis, setMinEvictableIdleTimeMillis, setNumTestsPerEvictionRun, setSoftMinEvictableIdleTimeMillis, setTestOnBorrow, setTestOnCreate, setTestOnReturn, setTestWhileIdle, setTimeBetweenEvictionRunsMillistoStringpublic static final int DEFAULT_MAX_TOTAL_PER_KEY
maxTotalPerKey configuration attribute.public static final int DEFAULT_MAX_TOTAL
maxTotal configuration attribute.public static final int DEFAULT_MIN_IDLE_PER_KEY
minIdlePerKey configuration attribute.public static final int DEFAULT_MAX_IDLE_PER_KEY
maxIdlePerKey configuration attribute.public GenericKeyedObjectPoolConfig()
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 getMaxTotalPerKey()
maxTotalPerKey configuration attribute
for pools created with this configuration instance.maxTotalPerKey for this
configuration instanceGenericKeyedObjectPool.getMaxTotalPerKey()public void setMaxTotalPerKey(int maxTotalPerKey)
maxTotalPerKey configuration attribute for
pools created with this configuration instance.maxTotalPerKey - The new setting of maxTotalPerKey
for this configuration instanceGenericKeyedObjectPool.setMaxTotalPerKey(int)public int getMinIdlePerKey()
minIdlePerKey configuration attribute
for pools created with this configuration instance.minIdlePerKey for this
configuration instanceGenericKeyedObjectPool.getMinIdlePerKey()public void setMinIdlePerKey(int minIdlePerKey)
minIdlePerKey configuration attribute for
pools created with this configuration instance.minIdlePerKey - The new setting of minIdlePerKey
for this configuration instanceGenericKeyedObjectPool.setMinIdlePerKey(int)public int getMaxIdlePerKey()
maxIdlePerKey configuration attribute
for pools created with this configuration instance.maxIdlePerKey for this
configuration instanceGenericKeyedObjectPool.getMaxIdlePerKey()public void setMaxIdlePerKey(int maxIdlePerKey)
maxIdlePerKey configuration attribute for
pools created with this configuration instance.maxIdlePerKey - The new setting of maxIdlePerKey
for this configuration instanceGenericKeyedObjectPool.setMaxIdlePerKey(int)public GenericKeyedObjectPoolConfig<T> clone()
protected void toStringAppendFields(StringBuilder builder)
BaseObjectBaseObject.toString() output.toStringAppendFields in class BaseObjectPoolConfig<T>builder - Field names and values are appended to this objectCopyright © 2001–2019 The Apache Software Foundation. All rights reserved.