Interface Cache<K,V>

Type Parameters:
K - the class of the keys
V - the class of the values
All Known Subinterfaces:
LoadingCache<K,V>
All Known Implementing Classes:
CaffeineCache, CaffeineLoadingCache, HashMapLoadingCache

public interface Cache<K,V>
Author:
Andrea Di Cesare <andrea@softinstigate.com>
  • Method Details

    • get

      Optional<V> get(K key)
    • remove

      Optional<V> remove(K key)
    • put

      void put(K key, V value)
    • cleanUp

      void cleanUp()
      Performs any pending maintenance operations needed by the cache.
    • invalidate

      void invalidate(K key)
    • invalidateAll

      void invalidateAll()
    • asMap

      Map<K,Optional<V>> asMap()