Class InMemoryIdempotencyStore

java.lang.Object
com.tnsai.idempotency.InMemoryIdempotencyStore
All Implemented Interfaces:
IdempotencyStore

public final class InMemoryIdempotencyStore extends Object implements IdempotencyStore
Default IdempotencyStore — process-local, ephemeral, no external dependencies (issue #91). Suitable for single-process deployments and tests; production multi-process deployments should pick a Redis or Postgres adapter (separate follow-up PRs) so dedup survives process restarts and works across instances.

Eviction is lazy: an expired entry stays in the map until the next get(String) for that key, at which point it is removed and the lookup returns empty. This keeps the put/get path lock-free at the cost of one map slot per expired-but-not-yet-touched key. For deployments that hold a steady set of keys, that's free; for deployments where the key space grows unboundedly, prefer the external-store adapters which can scan + evict in the background.

Since:
0.5.0 (issue #91)