Class TinyCacheAdapter

  • All Implemented Interfaces:
    Frequency

    public final class TinyCacheAdapter
    extends Object
    implements Frequency
    The TinyCache admission policy.
    • Constructor Detail

      • TinyCacheAdapter

        public TinyCacheAdapter​(Config config)
        Note that in this implementation there are always 64 items per set.
    • Method Detail

      • frequency

        public int frequency​(long e)
        Description copied from interface: Frequency
        Returns the estimated number of times the element was seen.
        Specified by:
        frequency in interface Frequency
      • increment

        public void increment​(long e)
        Description copied from interface: Frequency
        Increments the popularity of the element.
        Specified by:
        increment in interface Frequency