Interface LocalCache.Element
-
- Enclosing interface:
- LocalCache
public static interface LocalCache.Element
Use to enrich object with meta-data (help to choice if attached object has to be removed from cache)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description longgetLastValidityTimestamp()time when this will be no longer valid.default ObjectgetValue()<T> TgetValue(Class<T> expectedType)Get the cached object.
-
-
-
Method Detail
-
getValue
<T> T getValue(Class<T> expectedType)
Get the cached object.- Type Parameters:
T- : Type.- Parameters:
expectedType- : expected type of object.- Returns:
- cached object.
-
getLastValidityTimestamp
long getLastValidityTimestamp()
time when this will be no longer valid.- Returns:
- Last validity timestamp.
-
-