Interface Cache<K,V>
-
- All Known Implementing Classes:
LRUCache
public interface Cache<K,V>Define operations of a cache
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description VgetEntry(K key)Retrieve the cache entry for the specified key.voidinvalidateCache()Invalidate the entire cachevoidinvalidateCache(K key)Invalidate the cache for a specific key.voidsetEntry(K key, V value)Set the cache entry for the specified path.
-
-
-
Method Detail
-
getEntry
V getEntry(K key)
Retrieve the cache entry for the specified key.- Parameters:
key- The cache entry key- Returns:
- V The cache entry
-
setEntry
void setEntry(K key, V value)
Set the cache entry for the specified path.- Parameters:
key- The cache entry keyvalue- The cache entry
-
invalidateCache
void invalidateCache()
Invalidate the entire cache
-
invalidateCache
void invalidateCache(K key)
Invalidate the cache for a specific key.- Parameters:
key- The cache entry key
-
-