Interface Cache<K extends Serializable,​V extends Serializable>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void clear()
      Removes all entries in this cache
      void destroy()
      Destroys this cache instance
      void evict​(Collection<K> keys)
      Evicts the given keys, if present
      void evict​(Predicate<K> predicate)
      Evicts the keys matching the given predicate
      V get​(K key, Callable<V> producer)
      Returns the value currently associated with the given key, or gets one from the given producer if none
      CacheType<K,​V> getType()
      Returns this cache type
    • Method Detail

      • clear

        void clear()
        Removes all entries in this cache
      • destroy

        void destroy()
        Destroys this cache instance
      • evict

        void evict​(Collection<K> keys)
        Evicts the given keys, if present
      • evict

        void evict​(Predicate<K> predicate)
        Evicts the keys matching the given predicate
      • get

        V get​(K key,
              Callable<V> producer)
        Returns the value currently associated with the given key, or gets one from the given producer if none
      • getType

        CacheType<K,​V> getType()
        Returns this cache type