|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.ehcache.store.LfuPolicy
public final class LfuPolicy
Contains common LFU policy code for use between the LfuMemoryStore and the DiskStore, which also uses an LfuPolicy for evictions.
Nested Class Summary | |
---|---|
static interface |
LfuPolicy.Metadata
A type representing relevant metadata from an element, used by LfuPolicy for its operations. |
Method Summary | |
---|---|
static int[] |
generateRandomSample(int populationSize)
Generates a random sample from a population |
static LfuPolicy.Metadata |
leastHit(LfuPolicy.Metadata[] sampledElements,
LfuPolicy.Metadata justAdded)
Finds the least hit of the sampled elements provided |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static LfuPolicy.Metadata leastHit(LfuPolicy.Metadata[] sampledElements, LfuPolicy.Metadata justAdded)
sampledElements
- this should be a random subset of the populationjustAdded
- we never want to select the element just added. May be null.
public static int[] generateRandomSample(int populationSize)
populationSize
- the size to draw from
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |