Class PersistentCacheEntryFactory
java.lang.Object
se.liu.ida.hefquin.federation.access.impl.cache.PersistentCacheEntryFactory
- All Implemented Interfaces:
CacheEntryFactory<PersistentCacheEntry,CompletableFuture<? extends DataRetrievalResponse<?>>>
public class PersistentCacheEntryFactory
extends Object
implements CacheEntryFactory<PersistentCacheEntry,CompletableFuture<? extends DataRetrievalResponse<?>>>
Factory for creating
PersistentCacheEntry instances with the
current system time as creation timestamp.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateCacheEntry(CompletableFuture<? extends DataRetrievalResponse<?>> object) Creates a new cache entry for the given object, using the current time (in milliseconds since the epoch) as the creation timestamp.
-
Constructor Details
-
PersistentCacheEntryFactory
public PersistentCacheEntryFactory()
-
-
Method Details
-
createCacheEntry
public PersistentCacheEntry createCacheEntry(CompletableFuture<? extends DataRetrievalResponse<?>> object) Creates a new cache entry for the given object, using the current time (in milliseconds since the epoch) as the creation timestamp.- Specified by:
createCacheEntryin interfaceCacheEntryFactory<PersistentCacheEntry,CompletableFuture<? extends DataRetrievalResponse<?>>> - Parameters:
object- the cached object, represented as aCompletableFutureproviding aDataRetrievalResponse- Returns:
- a new
PersistentCacheEntrywrapping the given object
-