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:
-
Field Summary
Fields inherited from class se.liu.ida.hefquin.base.datastructures.impl.cache.CacheEntryBase
creationTime, obj -
Constructor Summary
ConstructorsConstructorDescriptionPersistentCacheEntry(CompletableFuture<? extends DataRetrievalResponse<?>> object, long creationTime) Creates a new cache entry. -
Method Summary
Methods inherited from class se.liu.ida.hefquin.base.datastructures.impl.cache.CacheEntryBase
createdAt, equals, getObject, hashCode
-
Constructor Details
-
PersistentCacheEntry
public PersistentCacheEntry(CompletableFuture<? extends DataRetrievalResponse<?>> object, long creationTime) Creates a new cache entry.- Parameters:
object- a future providing the cachedDataRetrievalResponsecreationTime- the timestamp representing when this entry was created
-
-
Method Details
-
toString
-