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.voidinvalidate(T key) Invalidate a single cached value.voidInvalidate all values in the cache.voidSet a cached value.
-
Method Details
-
get
Retrieve a cached value.- Parameters:
key- the key- Returns:
- the cached value, may be
nullif not present
-
put
Set a cached value.- Parameters:
key- the key, notnullvalue- the value, notnull
-
invalidate
Invalidate a single cached value.- Parameters:
key- the key, notnull
-
invalidateAll
void invalidateAll()Invalidate all values in the cache.
-