public class EvictionConfig extends Object
EvictionPolicy
instances. The EvictionPolicy
may also have
its own specific configuration attributes.
This class is immutable and thread-safe.
Constructor and Description |
---|
EvictionConfig(Duration idleEvictDuration,
Duration idleSoftEvictDuration,
int minIdle)
Creates a new eviction configuration with the specified parameters.
|
EvictionConfig(long poolIdleEvictMillis,
long poolIdleSoftEvictMillis,
int minIdle)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
Duration |
getIdleEvictDuration()
Gets the
idleEvictTime for this eviction configuration
instance. |
long |
getIdleEvictTime()
Deprecated.
|
Duration |
getIdleEvictTimeDuration()
Deprecated.
|
Duration |
getIdleSoftEvictDuration()
Gets the
idleSoftEvictTime for this eviction configuration
instance. |
long |
getIdleSoftEvictTime()
Deprecated.
|
Duration |
getIdleSoftEvictTimeDuration()
Deprecated.
|
int |
getMinIdle()
Gets the
minIdle for this eviction configuration instance. |
String |
toString() |
public EvictionConfig(Duration idleEvictDuration, Duration idleSoftEvictDuration, int minIdle)
idleEvictDuration
- Expected to be provided by
BaseGenericObjectPool.getMinEvictableIdleDuration()
idleSoftEvictDuration
- Expected to be provided by
BaseGenericObjectPool.getSoftMinEvictableIdleDuration()
minIdle
- Expected to be provided by
GenericObjectPool.getMinIdle()
or
GenericKeyedObjectPool.getMinIdlePerKey()
@Deprecated public EvictionConfig(long poolIdleEvictMillis, long poolIdleSoftEvictMillis, int minIdle)
EvictionConfig(Duration, Duration, int)
.poolIdleEvictMillis
- Expected to be provided by
BaseGenericObjectPool.getMinEvictableIdleDuration()
poolIdleSoftEvictMillis
- Expected to be provided by
BaseGenericObjectPool.getSoftMinEvictableIdleDuration()
minIdle
- Expected to be provided by
GenericObjectPool.getMinIdle()
or
GenericKeyedObjectPool.getMinIdlePerKey()
public Duration getIdleEvictDuration()
idleEvictTime
for this eviction configuration
instance.
How the evictor behaves based on this value will be determined by the
configured EvictionPolicy
.
idleEvictTime
.@Deprecated public long getIdleEvictTime()
getIdleEvictDuration()
.idleEvictTime
for this eviction configuration
instance.
How the evictor behaves based on this value will be determined by the
configured EvictionPolicy
.
idleEvictTime
in milliseconds@Deprecated public Duration getIdleEvictTimeDuration()
getIdleEvictDuration()
.idleEvictTime
for this eviction configuration
instance.
How the evictor behaves based on this value will be determined by the
configured EvictionPolicy
.
idleEvictTime
.public Duration getIdleSoftEvictDuration()
idleSoftEvictTime
for this eviction configuration
instance.
How the evictor behaves based on this value will be determined by the
configured EvictionPolicy
.
@Deprecated public long getIdleSoftEvictTime()
getIdleSoftEvictDuration()
.idleSoftEvictTime
for this eviction configuration
instance.
How the evictor behaves based on this value will be determined by the
configured EvictionPolicy
.
@Deprecated public Duration getIdleSoftEvictTimeDuration()
getIdleSoftEvictDuration()
.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
Copyright © 2000-2022 Apache Software Foundation. All Rights Reserved.