Class YFastFIFOMap<K,​V>

    • Constructor Detail

      • YFastFIFOMap

        public YFastFIFOMap​(int maxEntries)
    • Method Detail

      • getMaxReachedSize

        public int getMaxReachedSize()
        Description copied from interface: CacheMap
        The maximum size since initialization/creation
        Specified by:
        getMaxReachedSize in interface CacheMap<K,​V>
        Overrides:
        getMaxReachedSize in class YFastMap<K,​V>
        Returns:
        the maximum size since initialization
      • maxSize

        public int maxSize()
        Description copied from interface: CacheMap
        The maximum allowed size of the map
        Specified by:
        maxSize in interface CacheMap<K,​V>
      • processDisplacedEntry

        public void processDisplacedEntry​(K key,
                                          V value)
        Description copied from interface: CacheMap
        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
        Specified by:
        processDisplacedEntry in interface CacheMap<K,​V>
      • synchronizeExternal

        public boolean synchronizeExternal()