Interface ObjectKey<T>

Type Parameters:
T - The type of the cached object (which is the generic type of the ObjectCreator too)
All Known Implementing Classes:
Cache2Test.TestObjectKey

public interface ObjectKey<T>
The ObjectKey is responsible for the lookup of the cached object.

An ObjectKey is characterized by an unique signature and an expiration state. The signature must always be unique within on caching system. (Note: each caching system is managed by a separate ObjectCacheManager).

The expiration state indicates whether the cached objectvalue is valid anymore. can change from valied to expired and vice versa.

  • Method Details

    • getSignature

      Object getSignature()
      A signature which must be unique within one cache system. Think analogical of a key within a map.
      Returns:
      Signature object
    • getExpired

      boolean getExpired()
      Indicates whether the cached object is still valid.
      Returns:
      true when the object is still valid; false otherwise
    • getObjectCreator

      ObjectCreator<T> getObjectCreator()
      The ObjectCreator which can create an Object for this key.
      Returns:
      ObjectCreator