public class EvictionConfig
extends java.lang.Object
EvictionPolicy
instances. The EvictionPolicy
may also have
its own specific configuration attributes.
This class is immutable and thread-safe.
构造器和说明 |
---|
EvictionConfig(java.time.Duration poolIdleEvictTime,
java.time.Duration poolIdleSoftEvictTime,
int minIdle)
Creates a new eviction configuration with the specified parameters.
|
EvictionConfig(long poolIdleEvictTime,
long poolIdleSoftEvictTime,
int minIdle)
已过时。
|
限定符和类型 | 方法和说明 |
---|---|
long |
getIdleEvictTime()
Gets the
idleEvictTime for this eviction configuration
instance. |
java.time.Duration |
getIdleEvictTimeDuration()
Gets the
idleEvictTime for this eviction configuration
instance. |
long |
getIdleSoftEvictTime()
Gets the
idleSoftEvictTime for this eviction configuration
instance. |
java.time.Duration |
getIdleSoftEvictTimeDuration()
Gets the
idleSoftEvictTime for this eviction configuration
instance. |
int |
getMinIdle()
Gets the
minIdle for this eviction configuration instance. |
java.lang.String |
toString() |
public EvictionConfig(java.time.Duration poolIdleEvictTime, java.time.Duration poolIdleSoftEvictTime, int minIdle)
poolIdleEvictTime
- Expected to be provided by
BaseGenericObjectPool.getMinEvictableIdleTimeMillis()
poolIdleSoftEvictTime
- Expected to be provided by
BaseGenericObjectPool.getSoftMinEvictableIdleTimeMillis()
minIdle
- Expected to be provided by
GenericObjectPool.getMinIdle()
or
GenericKeyedObjectPool.getMinIdlePerKey()
@Deprecated public EvictionConfig(long poolIdleEvictTime, long poolIdleSoftEvictTime, int minIdle)
EvictionConfig(Duration, Duration, int)
.poolIdleEvictTime
- Expected to be provided by
BaseGenericObjectPool.getMinEvictableIdleTimeMillis()
poolIdleSoftEvictTime
- Expected to be provided by
BaseGenericObjectPool.getSoftMinEvictableIdleTimeMillis()
minIdle
- Expected to be provided by
GenericObjectPool.getMinIdle()
or
GenericKeyedObjectPool.getMinIdlePerKey()
public long getIdleEvictTime()
idleEvictTime
for this eviction configuration
instance.
How the evictor behaves based on this value will be determined by the
configured EvictionPolicy
.
idleEvictTime
in millisecondspublic java.time.Duration getIdleEvictTimeDuration()
idleEvictTime
for this eviction configuration
instance.
How the evictor behaves based on this value will be determined by the
configured EvictionPolicy
.
idleEvictTime
.public long getIdleSoftEvictTime()
idleSoftEvictTime
for this eviction configuration
instance.
How the evictor behaves based on this value will be determined by the
configured EvictionPolicy
.
public java.time.Duration getIdleSoftEvictTimeDuration()
idleSoftEvictTime
for this eviction configuration
instance.
How the evictor behaves based on this value will be determined by the
configured EvictionPolicy
.
public int getMinIdle()
minIdle
for this eviction configuration instance.
How the evictor behaves based on this value will be determined by the
configured EvictionPolicy
.
minIdle
public java.lang.String toString()
toString
在类中 java.lang.Object