Interface EvictableCache<K,​V>

    • Method Detail

      • remove

        V remove​(Object key)
        Remove the cached value by the key
        Specified by:
        remove in interface Map<K,​V>
        Parameters:
        key - of the cached value
        Returns:
        returns the removed value
      • clearAll

        Map<K,​V> clearAll()
        Clear the cache
        Returns:
        returns the content of the cleared map
      • clear

        default void clear()
        Clear the cache
        Specified by:
        clear in interface Map<K,​V>
        See Also:
        clearAll()
      • values

        Collection<V> values()
        Get all cached values
        Specified by:
        values in interface Map<K,​V>
        Returns:
        all cached values
      • keys

        Set<K> keys()
        Get all keys associated to cached values
        Returns:
        all keys
      • containsKey

        boolean containsKey​(Object key)
        Determines if the cache contains an entry for the specified key.
        Specified by:
        containsKey in interface Map<K,​V>
        Parameters:
        key - key whose presence in this cache is to be tested.
        Returns:
        true if the cache contains a mapping for the specified key
      • size

        int size()
        Get the size of the cache
        Specified by:
        size in interface Map<K,​V>
        Returns:
        the size of the cache