Interface LeastRecentlyUsedMap.RemovalListener<K,​V>

  • Enclosing class:
    LeastRecentlyUsedMap<K,​V>

    public static interface LeastRecentlyUsedMap.RemovalListener<K,​V>
    The RemovalListener is used with the least recently used hash map to listen for removals. A callback is issued if an entry has been removed from the container because it was the least recently used entry.
    • Method Detail

      • notifyRemoved

        void notifyRemoved​(K key,
                           V value)
        This method is called when the entry has been removed due to the capacity having been reached. On removal any implementation can take action using the key or value.
        Parameters:
        key - this is the key of the removed entry
        value - this is the value of the removed entry