Class AbstractCacheMap<K,​V>

    • Constructor Detail

      • AbstractCacheMap

        public AbstractCacheMap​(int size,
                                long timeToLiveInMillis,
                                long maxIdleInMillis)
    • Method Detail

      • onValueRead

        protected void onValueRead​(CachedValue<K,​V> value)
      • onValueRemove

        protected void onValueRemove​(CachedValue<K,​V> value)
      • size

        public int size()
        Specified by:
         in interface <K,​V>
      • isEmpty

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

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

        public boolean containsValue​( value)
        Specified by:
         in interface <K,​V>
      • get

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

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

        protected CachedValue<K,​V> create​(K key,
                                                V value,
                                                long ttl,
                                                long maxIdleTime)
      • onValueCreate

        protected void onValueCreate​(CachedValue<K,​V> entry)
      • removeExpiredEntries

        protected boolean removeExpiredEntries()
      • onMapFull

        protected abstract void onMapFull()
      • isFull

        protected boolean isFull​(K key)
      • remove

        public  key)
        Specified by:
         in interface <K,​V>
      • putAll

        public void putAll​(<? extends K,​? extends V> m)
        Specified by:
         in interface <K,​V>
      • clear

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

        public <K> keySet()
        Specified by:
         in interface <K,​V>
      • values

        public <V> values()
        Specified by:
         in interface <K,​V>
      • entrySet

        public <<K,​V>> entrySet()
        Specified by:
         in interface <K,​V>
      • putIfAbsent

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

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

        public boolean replace​(K key,
                               V oldValue,
                               V newValue)
        Specified by:
         in interface <K,​V>
        Specified by:
         in interface <K,​V>
      • replace

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