public interface HillClimber
| Modifier and Type | Interface and Description |
|---|---|
static class |
HillClimber.Adaptation
The adaptation type and its magnitude.
|
static class |
HillClimber.QueueType |
| Modifier and Type | Method and Description |
|---|---|
HillClimber.Adaptation |
adapt(double windowSize,
double probationSize,
double protectedSize,
boolean isFull)
Determines how to adapt the segment sizes.
|
void |
onHit(long key,
HillClimber.QueueType queue,
boolean isFull)
Records that a hit occurred with a full cache.
|
void |
onMiss(long key,
boolean isFull)
Records that a miss occurred with a full cache.
|
void onHit(long key,
HillClimber.QueueType queue,
boolean isFull)
key - the key accessedqueue - the queue the entry was found inisFull - if the cache is fully populatedvoid onMiss(long key,
boolean isFull)
key - the key accessedisFull - if the cache is fully populated and had to evictHillClimber.Adaptation adapt(double windowSize, double probationSize, double protectedSize, boolean isFull)
windowSize - the current window sizeprobationSize - the current probation sizeprotectedSize - the current protected sizeisFull - if the cache is fully populated