Class IndicatorClimber

  • All Implemented Interfaces:
    HillClimber

    public final class IndicatorClimber
    extends Object
    implements HillClimber
    Adjust the window size based on the Indicator value.
    • Constructor Detail

      • IndicatorClimber

        public IndicatorClimber​(Config config)
    • Method Detail

      • onHit

        public void onHit​(long key,
                          HillClimber.QueueType queue,
                          boolean isFull)
        Description copied from interface: HillClimber
        Records that a hit occurred with a full cache.
        Specified by:
        onHit in interface HillClimber
        Parameters:
        key - the key accessed
        queue - the queue the entry was found in
        isFull - if the cache is fully populated
      • onMiss

        public void onMiss​(long key,
                           boolean isFull)
        Description copied from interface: HillClimber
        Records that a miss occurred with a full cache.
        Specified by:
        onMiss in interface HillClimber
        Parameters:
        key - the key accessed
        isFull - if the cache is fully populated and had to evict
      • adapt

        public HillClimber.Adaptation adapt​(double windowSize,
                                            double probationSize,
                                            double protectedSize,
                                            boolean isFull)
        Description copied from interface: HillClimber
        Determines how to adapt the segment sizes.
        Specified by:
        adapt in interface HillClimber
        Parameters:
        windowSize - the current window size
        probationSize - the current probation size
        protectedSize - the current protected size
        isFull - if the cache is fully populated
        Returns:
        the adjustment to the segments