Class ClimberResetCountMin4

  • All Implemented Interfaces:
    Frequency

    public final class ClimberResetCountMin4
    extends CountMin4
    A sketch where the aging process is a dynamic process and adjusts to the recency/frequency bias of the actual workload.
    • Constructor Detail

      • ClimberResetCountMin4

        public ClimberResetCountMin4​(Config config)
    • Method Detail

      • ensureCapacity

        protected void ensureCapacity​(long maximumSize)
        Description copied from class: CountMin4
        Increases the capacity of this FrequencySketch instance, if necessary, to ensure that it can accurately estimate the popularity of elements given the maximum size of the cache. This operation forgets all previous counts when resizing.
        Overrides:
        ensureCapacity in class CountMin4
        Parameters:
        maximumSize - the maximum size of the cache
      • frequency

        public int frequency​(long e)
        Description copied from class: CountMin4
        Returns the estimated number of occurrences of an element, up to the maximum (15).
        Specified by:
        frequency in interface Frequency
        Overrides:
        frequency in class CountMin4
        Parameters:
        e - the element to count occurrences of
        Returns:
        the estimated number of occurrences of the element; possibly zero but never negative
      • increment

        public void increment​(long e)
        Description copied from class: CountMin4
        Increments the popularity of the element if it does not exceed the maximum (15). The popularity of all elements will be periodically down sampled when the observed events exceed a threshold. This process provides a frequency aging to allow expired long term entries to fade away.
        Specified by:
        increment in interface Frequency
        Overrides:
        increment in class CountMin4
        Parameters:
        e - the element to add
      • tryReset

        protected void tryReset​(boolean added)
        Reduces every counter by half of its original value. To reduce the truncation error, the sample is reduced by the number of counters with an odd value.
        Specified by:
        tryReset in class CountMin4
      • reportMiss

        public void reportMiss()
        Description copied from interface: Frequency
        Feedback to allow for adaptability.
      • getStep

        public int getStep()
      • setStep

        public void setStep​(int x)
      • getEventsToCount

        public int getEventsToCount()
      • resetEventsToCount

        public void resetEventsToCount()
      • getPeriod

        public int getPeriod()