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 poolIdleEvictTime, long poolIdleSoftEvictTime, int minIdle)Create a new eviction configuration with the specified parameters.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetIdleEvictTime()Obtain theidleEvictTimefor this eviction configuration instance.longgetIdleSoftEvictTime()Obtain theidleSoftEvictTimefor this eviction configuration instance.intgetMinIdle()Obtain theminIdlefor this eviction configuration instance.java.lang.StringtoString()
 
- 
- 
- 
Constructor Detail- 
EvictionConfigpublic EvictionConfig(long poolIdleEvictTime, long poolIdleSoftEvictTime, int minIdle)Create a new eviction configuration with the specified parameters. Instances are immutable.- Parameters:
- 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()
 
 
- 
 - 
Method Detail- 
getIdleEvictTimepublic long getIdleEvictTime() Obtain theidleEvictTimefor this eviction configuration instance.How the evictor behaves based on this value will be determined by the configured EvictionPolicy.- Returns:
- The idleEvictTimein milliseconds
 
 - 
getIdleSoftEvictTimepublic long getIdleSoftEvictTime() Obtain 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() Obtain 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
 
 
- 
 
-