Class SieveCache<K,​V extends MemoryObject>

  • Type Parameters:
    K - the key type
    V - the value type

    public class SieveCache<K,​V extends MemoryObject>
    extends Object
    A Sieve cache. It is faster and has a higher hit-rate than LRU. See https://cachemon.github.io/SIEVE-website/
    • Constructor Detail

      • SieveCache

        public SieveCache​(long maxMemoryBytes)
    • Method Detail

      • setSize

        public void setSize​(int maxMemoryBytes)
      • get

        public V get​(K key)
      • keys

        public Set<K> keys()
      • put

        public V put​(K key,
                     V value)
      • entryWasRemoved

        public void entryWasRemoved​(K key,
                                    V value)
      • size

        public int size()