Class PeriodicResetCountMin4
- java.lang.Object
-
- com.github.benmanes.caffeine.cache.simulator.admission.countmin4.CountMin4
-
- com.github.benmanes.caffeine.cache.simulator.admission.countmin4.PeriodicResetCountMin4
-
-
Field Summary
-
Fields inherited from class com.github.benmanes.caffeine.cache.simulator.admission.countmin4.CountMin4
conservative, step, table, tableMask
-
-
Constructor Summary
Constructors Constructor Description PeriodicResetCountMin4(Config config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidensureCapacity(long maximumSize)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.intfrequency(long e)Returns the estimated number of occurrences of an element, up to the maximum (15).voidincrement(long e)Increments the popularity of the element if it does not exceed the maximum (15).protected voidtryReset(boolean added)Reduces every counter by half of its original value.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.github.benmanes.caffeine.cache.simulator.admission.Frequency
reportMiss
-
-
-
-
Constructor Detail
-
PeriodicResetCountMin4
public PeriodicResetCountMin4(Config config)
-
-
Method Detail
-
ensureCapacity
protected void ensureCapacity(long maximumSize)
Description copied from class:CountMin4Increases 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:
ensureCapacityin classCountMin4- Parameters:
maximumSize- the maximum size of the cache
-
frequency
public int frequency(long e)
Description copied from class:CountMin4Returns the estimated number of occurrences of an element, up to the maximum (15).
-
increment
public void increment(long e)
Description copied from class:CountMin4Increments 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.
-
-