Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Implement evictionPolicy

Open
#558 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
java, scala
Domain
backend

Research direction

No source files or tests are named. Start by reviewing keypool's current idleTimeAllowedInPool eviction behavior and the referenced commons-pool2 EvictionPolicy and DefaultEvictionPolicy documentation. Done requires identifying relevant custom-policy use cases and agreeing on the policy and configuration scope before implementation.

Written by the indexing model from the issue text.

Description

commons-pool2 parity

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

Dominant language
Scala
Stars
39
Forks
18
Avg merge
8h 26m
Merged PRs (30d)
4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from typelevel/keypool

All issues in typelevel/keypool

Similar issues

More Scala issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.