Package overit.geocall.cache
Class Item<V,C>
java.lang.Object
overit.geocall.cache.Item<V,C>
- Type Parameters:
V- the type of the valueC- the type of the composed value
Class that contains the value (both the real and compound value) of an entry extracted from the
Cache.-
Constructor Details
-
Item
Create a new Item instance by passing the loaded value and the composed value- Parameters:
value- the value of the cache's entrycomposedValue- the composed value of the cache's entry
-
-
Method Details
-
getValue
- Returns:
- the real value of the cache's entry
-
getComposedValue
- Returns:
- the composed value of the cache's entry
-
isValid
public boolean isValid()Check if the cache item is still valid or must be re-loaded- Returns:
trueif the item is still valid,falseotherwise
-
invalidate
public void invalidate()Invalidate the current cache item. This should force to throws away this instance and reload it again.
-