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.
| 限定符和类型 | 字段和说明 |
|---|---|
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, DEFAULT_EVICTOR_SHUTDOWN_TIMEOUT_MILLIS, DEFAULT_FAIRNESS, DEFAULT_JMX_ENABLE, DEFAULT_JMX_NAME_BASE, DEFAULT_JMX_NAME_PREFIX, DEFAULT_LIFO, DEFAULT_MAX_WAIT, DEFAULT_MAX_WAIT_MILLIS, DEFAULT_MIN_EVICTABLE_IDLE_TIME, DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS, DEFAULT_NUM_TESTS_PER_EVICTION_RUN, DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME, 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, DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS| 构造器和说明 |
|---|
GenericKeyedObjectPoolConfig()
Create a new configuration with default settings.
|
| 限定符和类型 | 方法和说明 |
|---|---|
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. |
getBlockWhenExhausted, getEvictionPolicy, getEvictionPolicyClassName, getEvictorShutdownTimeout, getEvictorShutdownTimeoutMillis, getFairness, getJmxEnabled, getJmxNameBase, getJmxNamePrefix, getLifo, getMaxWaitMillis, getMinEvictableIdleTime, getMinEvictableIdleTimeMillis, getNumTestsPerEvictionRun, getSoftMinEvictableIdleTime, getSoftMinEvictableIdleTimeMillis, getTestOnBorrow, getTestOnCreate, getTestOnReturn, getTestWhileIdle, getTimeBetweenEvictionRuns, getTimeBetweenEvictionRunsMillis, setBlockWhenExhausted, setEvictionPolicy, setEvictionPolicyClassName, setEvictorShutdownTimeoutMillis, setEvictorShutdownTimeoutMillis, setFairness, setJmxEnabled, setJmxNameBase, setJmxNamePrefix, setLifo, setMaxWaitMillis, setMinEvictableIdleTime, setMinEvictableIdleTimeMillis, setNumTestsPerEvictionRun, setSoftMinEvictableIdleTime, setSoftMinEvictableIdleTimeMillis, setTestOnBorrow, setTestOnCreate, setTestOnReturn, setTestWhileIdle, setTimeBetweenEvictionRuns, 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 GenericKeyedObjectPoolConfig<T> clone()
clone 在类中 java.lang.Objectpublic int getMaxIdlePerKey()
maxIdlePerKey configuration attribute
for pools created with this configuration instance.maxIdlePerKey for this
configuration instanceGenericKeyedObjectPool.getMaxIdlePerKey()public int getMaxTotal()
maxTotal configuration attribute
for pools created with this configuration instance.maxTotal for this
configuration instanceBaseGenericObjectPool.getMaxTotal()public int getMaxTotalPerKey()
maxTotalPerKey configuration attribute
for pools created with this configuration instance.maxTotalPerKey for this
configuration instanceGenericKeyedObjectPool.getMaxTotalPerKey()public int getMinIdlePerKey()
minIdlePerKey configuration attribute
for pools created with this configuration instance.minIdlePerKey for this
configuration instanceGenericKeyedObjectPool.getMinIdlePerKey()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 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 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 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)