Package com.inrupt.client
Interface ClientCache<T,U>
- Type Parameters:
T
- the key typeU
- the value type
public interface ClientCache<T,U>
A generic caching abstraction for use in the Inrupt Client Libraries.
-
Method Summary
Modifier and TypeMethodDescriptionRetrieve a cached value.void
invalidate
(T key) Invalidate a single cached value.void
Invalidate all values in the cache.void
Set a cached value.
-
Method Details
-
get
Retrieve a cached value.- Parameters:
key
- the key- Returns:
- the cached value, may be
null
if not present
-
put
Set a cached value.- Parameters:
key
- the key, notnull
value
- the value, notnull
-
invalidate
Invalidate a single cached value.- Parameters:
key
- the key, notnull
-
invalidateAll
void invalidateAll()Invalidate all values in the cache.
-