Package org.apache.tomcat.dbcp.pool2.impl

## Class EvictionConfig

- java.lang.Object
- - org.apache.tomcat.dbcp.pool2.impl.EvictionConfig

    public class EvictionConfig
    extends java.lang.Object

This class is used by pool implementations to pass configuration information to `EvictionPolicy` instances. The `EvictionPolicy` may also have its own specific configuration attributes.

This class is immutable and thread-safe.

Since:
  2.0

### Constructor Summary

Constructors
`EvictionConfig​(long poolIdleEvictTime, long poolIdleSoftEvictTime, int minIdle)` Create a new eviction configuration with the specified parameters.

### Method Summary

All Methods Instance Methods Concrete Methods
`long` `getIdleEvictTime()` Obtain the `idleEvictTime` for this eviction configuration instance.
`long` `getIdleSoftEvictTime()` Obtain the `idleSoftEvictTime` for this eviction configuration instance.
`int` `getMinIdle()` Obtain the `minIdle` for this eviction configuration instance.
`java.lang.String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### EvictionConfig

    public 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

#### getIdleEvictTime

    public long getIdleEvictTime()

Obtain the `idleEvictTime` for this eviction configuration instance.

How the evictor behaves based on this value will be determined by the configured `EvictionPolicy`.

Returns:
  The `idleEvictTime` in milliseconds

#### getIdleSoftEvictTime

    public long getIdleSoftEvictTime()

Obtain the `idleSoftEvictTime` for 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

#### getMinIdle

    public int getMinIdle()

Obtain the `minIdle` for this eviction configuration instance.

How the evictor behaves based on this value will be determined by the configured `EvictionPolicy`.

Returns:
  The `minIdle`

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`
Since:
  2.4