keypool icon indicating copy to clipboard operation
keypool copied to clipboard

Implement evictionPolicy

Open rossabaker opened this issue 1 year ago • 0 comments

commons-pool2 functionality

In commons-pool2, an EvictionPolicy determines whether an object is evicted on each run.

The DefaultEvictionPolicy considers multiple properties, including a notion of soft eviction.

Current behavior

keypool evicts on idleTimeAllowedInPool, how long the object has been idle, and the current time.

Analysis

commons-pool2's eviction policy is more sophisticated, but its configuration is more sophisticated. With custom eviction policies, it's possible to implement policies that contradict the configuration.

Before investing heavily in this, it would be interesting to identify cases where commons-pool2 clients have implemented their own policy and why.

Workarounds

None

rossabaker avatar Jun 26 '24 03:06 rossabaker