Class Item<V,C>

java.lang.Object
overit.geocall.cache.Item<V,C>
Type Parameters:
V - the type of the value
C - the type of the composed value

public class Item<V,C> extends Object
Class that contains the value (both the real and compound value) of an entry extracted from the Cache.
  • Constructor Details

    • Item

      public Item(V value, C composedValue)
      Create a new Item instance by passing the loaded value and the composed value
      Parameters:
      value - the value of the cache's entry
      composedValue - the composed value of the cache's entry
  • Method Details

    • getValue

      public V getValue()
      Returns:
      the real value of the cache's entry
    • getComposedValue

      public C 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:
      true if the item is still valid, false otherwise
    • invalidate

      public void invalidate()
      Invalidate the current cache item. This should force to throws away this instance and reload it again.