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

    Modifier and Type
    Method
    Description
    long
    time when this will be no longer valid.
    default Object
     
    <T> T
    getValue(Class<T> expectedType)
    Get the cached object.
  • Method Details

    • getValue

      <T> T getValue(Class<T> expectedType)
      Get the cached object.
      Type Parameters:
      T - : Type.
      Parameters:
      expectedType - : expected type of object.
      Returns:
      cached object.
    • getValue

      default Object getValue()
    • getLastValidityTimestamp

      time when this will be no longer valid.
      Returns:
      Last validity timestamp.