Interface HillClimber

    • 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 accessed
        queue - the queue the entry was found in
        isFull - 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 accessed
        isFull - 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 size
        probationSize - the current probation size
        protectedSize - the current protected size
        isFull - if the cache is fully populated
        Returns:
        the adjustment to the segments