chrisvest/stormpot — Issue #28: Rule-based deallocation
Author: chrisvest
Created: 2011-12-01 19:06:18+00:00
State: open
Labels: feature

Add a `DeallocationRule` API that allows users to provide their own algorithm to determine whether a slot is invalid or not.

Perhaps make it look something like this:

interface SlotInfo {
long getCreatedTime(); // millis since epoc
long claimCount();
T getValue();
}

interface DeallocationRule {
boolean isInvalid(SlotInfo slotInfo);
}

Make sure time-to-live remains a sane default.