Class SerializingCache<K,​V>

  • All Implemented Interfaces:
    CacheSize, ICache<K,​V>

    public class SerializingCache<K,​V>
    extends java.lang.Object
    implements ICache<K,​V>
    Serializes cache values off-heap.
    • Method Detail

      • setCapacity

        public void setCapacity​(long capacity)
        Specified by:
        setCapacity in interface CacheSize
      • isEmpty

        public boolean isEmpty()
      • size

        public int size()
        Specified by:
        size in interface CacheSize
      • clear

        public void clear()
        Specified by:
        clear in interface ICache<K,​V>
      • get

        public V get​(K key)
        Specified by:
        get in interface ICache<K,​V>
      • put

        public void put​(K key,
                        V value)
        Specified by:
        put in interface ICache<K,​V>
      • putIfAbsent

        public boolean putIfAbsent​(K key,
                                   V value)
        Specified by:
        putIfAbsent in interface ICache<K,​V>
      • replace

        public boolean replace​(K key,
                               V oldToReplace,
                               V value)
        Specified by:
        replace in interface ICache<K,​V>
      • remove

        public void remove​(K key)
        Specified by:
        remove in interface ICache<K,​V>
      • keyIterator

        public java.util.Iterator<K> keyIterator()
        Specified by:
        keyIterator in interface ICache<K,​V>
      • hotKeyIterator

        public java.util.Iterator<K> hotKeyIterator​(int n)
        Specified by:
        hotKeyIterator in interface ICache<K,​V>
      • containsKey

        public boolean containsKey​(K key)
        Specified by:
        containsKey in interface ICache<K,​V>