Class PersistentCacheEntry

java.lang.Object
se.liu.ida.hefquin.base.datastructures.impl.cache.CacheEntryBase<CompletableFuture<? extends DataRetrievalResponse<?>>>
se.liu.ida.hefquin.federation.access.impl.cache.PersistentCacheEntry
All Implemented Interfaces:
Serializable, CacheEntry<CompletableFuture<? extends DataRetrievalResponse<?>>>

public class PersistentCacheEntry extends CacheEntryBase<CompletableFuture<? extends DataRetrievalResponse<?>>>
Cache entry implementation for persistent caching.

Wraps a CompletableFuture holding a DataRetrievalResponse together with its creation timestamp.

The response is represented as a future to allow asynchronous retrieval, but may be already completed when stored in or retrieved from the cache.

See Also:
  • Constructor Details

    • PersistentCacheEntry

      public PersistentCacheEntry(CompletableFuture<? extends DataRetrievalResponse<?>> object, long creationTime)
      Creates a new cache entry.
      Parameters:
      object - a future providing the cached DataRetrievalResponse
      creationTime - the timestamp representing when this entry was created
  • Method Details