Class SimpleCache<K,​V>

  • All Implemented Interfaces:
    ICUCache<K,​V>

    public class SimpleCache<K,​V>
    extends java.lang.Object
    implements ICUCache<K,​V>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()  
      V get​(java.lang.Object key)  
      void put​(K key, V value)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • cacheRef

        private volatile java.lang.ref.Reference<java.util.Map<K,​V>> cacheRef
      • type

        private int type
      • capacity

        private int capacity
    • Constructor Detail

      • SimpleCache

        public SimpleCache()
      • SimpleCache

        public SimpleCache​(int cacheType)
      • SimpleCache

        public SimpleCache​(int cacheType,
                           int initialCapacity)
    • Method Detail

      • get

        public V get​(java.lang.Object key)
        Specified by:
        get in interface ICUCache<K,​V>
      • put

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

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