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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description U
get(T key)
Retrieve a cached value.void
invalidate(T key)
Invalidate a single cached value.void
invalidateAll()
Invalidate all values in the cache.void
put(T key, U value)
Set a cached value.
-
-
-
Method Detail
-
get
U get(T key)
Retrieve a cached value.- Parameters:
key
- the key- Returns:
- the cached value, may be
null
if not present
-
put
void put(T key, U value)
Set a cached value.- Parameters:
key
- the key, notnull
value
- the value, notnull
-
invalidate
void invalidate(T key)
Invalidate a single cached value.- Parameters:
key
- the key, notnull
-
invalidateAll
void invalidateAll()
Invalidate all values in the cache.
-
-