Interface HillClimber
-
- All Known Implementing Classes:
AbstractClimber,Adam,AmsGrad,IndicatorClimber,MiniSimClimber,Nadam,SimpleClimber,SimulatedAnnealingClimber,Stochastic
public interface HillClimberA hill climbing algorithm to tune the admission window size.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classHillClimber.AdaptationThe adaptation type and its magnitude.static classHillClimber.QueueType
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description HillClimber.Adaptationadapt(double windowSize, double probationSize, double protectedSize, boolean isFull)Determines how to adapt the segment sizes.voidonHit(long key, HillClimber.QueueType queue, boolean isFull)Records that a hit occurred with a full cache.voidonMiss(long key, boolean isFull)Records that a miss occurred with a full cache.
-
-
-
Method Detail
-
onHit
void onHit(long key, HillClimber.QueueType queue, boolean isFull)Records that a hit occurred with a full cache.- Parameters:
key- the key accessedqueue- the queue the entry was found inisFull- if the cache is fully populated
-
onMiss
void onMiss(long key, boolean isFull)Records that a miss occurred with a full cache.- Parameters:
key- the key accessedisFull- if the cache is fully populated and had to evict
-
adapt
HillClimber.Adaptation adapt(double windowSize, double probationSize, double protectedSize, boolean isFull)
Determines how to adapt the segment sizes.- Parameters:
windowSize- the current window sizeprobationSize- the current probation sizeprotectedSize- the current protected sizeisFull- if the cache is fully populated- Returns:
- the adjustment to the segments
-
-