Class RandomRemovalFrequencyTable
- java.lang.Object
-
- com.github.benmanes.caffeine.cache.simulator.admission.table.RandomRemovalFrequencyTable
-
- All Implemented Interfaces:
Frequency
public final class RandomRemovalFrequencyTable extends Object implements Frequency
A probabilistic multiset for estimating the popularity of an element within a time window. The maximum frequency of an element. The size of the sample in relation to the cache size can be controlled with a sample factor. Instead of halving the popularity of elements a random element is dropped when table is full. This class is used to check the feasibility of using TinyTable instead of CountMin Sketch.
-
-
Constructor Summary
Constructors Constructor Description RandomRemovalFrequencyTable(Config config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intfrequency(long e)Returns the estimated number of times the element was seen.voidincrement(long e)Increments the popularity of the element.-
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
-
-