Interface CacheMap<K,​V>

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void clear()  
      int getMaxReachedSize()
      The maximum size since initialization/creation
      int maxSize()
      The maximum allowed size of the map
      void processDisplacedEntry​(K key, V value)
      do something before a entry is displaced because the map is growing to big (if an entry is added and size() is getting bigger as maxSize()), this method will be called before an old entry is being removed
      int size()
      the current size of the cache map
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, values
    • Method Detail

      • clear

        void clear()
        Specified by:
        clear in interface java.util.Map<K,​V>
      • size

        int size()
        the current size of the cache map
        Specified by:
        size in interface java.util.Map<K,​V>
      • maxSize

        int maxSize()
        The maximum allowed size of the map
      • getMaxReachedSize

        int getMaxReachedSize()
        The maximum size since initialization/creation
        Returns:
        the maximum size since initialization
      • processDisplacedEntry

        void processDisplacedEntry​(K key,
                                   V value)
        do something before a entry is displaced because the map is growing to big (if an entry is added and size() is getting bigger as maxSize()), this method will be called before an old entry is being removed