public interface Policy
Modifier and Type | Method and Description |
---|---|
boolean |
compare(Element element1,
Element element2)
Compares the desirableness for eviction of two elements
|
String |
getName() |
Element |
selectedBasedOnPolicy(Element[] sampledElements,
Element justAdded)
Finds the best eviction candidate based on the sampled elements.
|
String getName()
Element selectedBasedOnPolicy(Element[] sampledElements, Element justAdded)
sampledElements
- this should be a random subset of the populationjustAdded
- we probably never want to select the element just added.
It is provided so that it can be ignored if selected. May be null.boolean compare(Element element1, Element element2)
element1
- the element to compare againstelement2
- the element to compareCopyright © 2003–2016 Terracotta, Inc.. All rights reserved.