Class EvictionConfig
- java.lang.Object
- 
- org.apache.tomcat.dbcp.pool2.impl.EvictionConfig
 
- 
 public class EvictionConfig extends java.lang.ObjectThis class is used by pool implementations to pass configuration information toEvictionPolicyinstances. TheEvictionPolicymay also have its own specific configuration attributes.This class is immutable and thread-safe. - Since:
- 2.0
 
- 
- 
Constructor SummaryConstructors Constructor Description EvictionConfig(long poolIdleEvictMillis, long poolIdleSoftEvictMillis, int minIdle)Deprecated.EvictionConfig(java.time.Duration idleEvictDuration, java.time.Duration idleSoftEvictDuration, int minIdle)Creates a new eviction configuration with the specified parameters.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.time.DurationgetIdleEvictDuration()Gets theidleEvictTimefor this eviction configuration instance.longgetIdleEvictTime()Deprecated.java.time.DurationgetIdleEvictTimeDuration()Deprecated.java.time.DurationgetIdleSoftEvictDuration()Gets theidleSoftEvictTimefor this eviction configuration instance.longgetIdleSoftEvictTime()Deprecated.java.time.DurationgetIdleSoftEvictTimeDuration()Deprecated.intgetMinIdle()Gets theminIdlefor this eviction configuration instance.java.lang.StringtoString()
 
- 
- 
- 
Constructor Detail- 
EvictionConfigpublic EvictionConfig(java.time.Duration idleEvictDuration, java.time.Duration idleSoftEvictDuration, int minIdle)Creates a new eviction configuration with the specified parameters. Instances are immutable.- Parameters:
- 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()
- Since:
- 2.10.0
 
 - 
EvictionConfig@Deprecated public EvictionConfig(long poolIdleEvictMillis, long poolIdleSoftEvictMillis, int minIdle)Deprecated.Creates a new eviction configuration with the specified parameters. Instances are immutable.- Parameters:
- 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()
 
 
- 
 - 
Method Detail- 
getIdleEvictDurationpublic java.time.Duration getIdleEvictDuration() Gets theidleEvictTimefor this eviction configuration instance.How the evictor behaves based on this value will be determined by the configured EvictionPolicy.- Returns:
- The idleEvictTime.
- Since:
- 2.11.0
 
 - 
getIdleEvictTime@Deprecated public long getIdleEvictTime() Deprecated.Gets theidleEvictTimefor this eviction configuration instance.How the evictor behaves based on this value will be determined by the configured EvictionPolicy.- Returns:
- The idleEvictTimein milliseconds
 
 - 
getIdleEvictTimeDuration@Deprecated public java.time.Duration getIdleEvictTimeDuration() Deprecated.Gets theidleEvictTimefor this eviction configuration instance.How the evictor behaves based on this value will be determined by the configured EvictionPolicy.- Returns:
- The idleEvictTime.
- Since:
- 2.10.0
 
 - 
getIdleSoftEvictDurationpublic java.time.Duration getIdleSoftEvictDuration() Gets theidleSoftEvictTimefor this eviction configuration instance.How the evictor behaves based on this value will be determined by the configured EvictionPolicy.- Returns:
- The (@code idleSoftEvictTime} in milliseconds
- Since:
- 2.11.0
 
 - 
getIdleSoftEvictTime@Deprecated public long getIdleSoftEvictTime() Deprecated.Gets theidleSoftEvictTimefor this eviction configuration instance.How the evictor behaves based on this value will be determined by the configured EvictionPolicy.- Returns:
- The (@code idleSoftEvictTime} in milliseconds
 
 - 
getIdleSoftEvictTimeDuration@Deprecated public java.time.Duration getIdleSoftEvictTimeDuration() Deprecated.Gets theidleSoftEvictTimefor this eviction configuration instance.How the evictor behaves based on this value will be determined by the configured EvictionPolicy.- Returns:
- The (@code idleSoftEvictTime} in milliseconds
 
 - 
getMinIdlepublic int getMinIdle() Gets theminIdlefor this eviction configuration instance.How the evictor behaves based on this value will be determined by the configured EvictionPolicy.- Returns:
- The minIdle
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
- Since:
- 2.4
 
 
- 
 
-