Class SimpleClimber
- java.lang.Object
-
- com.github.benmanes.caffeine.cache.simulator.policy.sketch.climbing.AbstractClimber
-
- com.github.benmanes.caffeine.cache.simulator.policy.sketch.climbing.hill.SimpleClimber
-
- All Implemented Interfaces:
HillClimber
public final class SimpleClimber extends AbstractClimber
A naive, simple hill climber.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.github.benmanes.caffeine.cache.simulator.policy.sketch.climbing.HillClimber
HillClimber.Adaptation, HillClimber.QueueType
-
-
Field Summary
-
Fields inherited from class com.github.benmanes.caffeine.cache.simulator.policy.sketch.climbing.AbstractClimber
hitsInMain, hitsInSample, hitsInWindow, missesInSample, previousHitRate, sampleSize
-
-
Constructor Summary
Constructors Constructor Description SimpleClimber(Config config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected doubleadjust(double hitRate)Returns the amount to adapt by.protected voidresetSample(double hitRate)Starts the next sample period.-
Methods inherited from class com.github.benmanes.caffeine.cache.simulator.policy.sketch.climbing.AbstractClimber
adapt, onHit, onMiss
-
-
-
-
Constructor Detail
-
SimpleClimber
public SimpleClimber(Config config)
-
-
Method Detail
-
adjust
protected double adjust(double hitRate)
Description copied from class:AbstractClimberReturns the amount to adapt by.- Specified by:
adjustin classAbstractClimber
-
resetSample
protected void resetSample(double hitRate)
Description copied from class:AbstractClimberStarts the next sample period.- Overrides:
resetSamplein classAbstractClimber
-
-