@ThreadSafe public interface CacheLoader<K,V> extends Lifecycle
CacheWriter.| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(java.lang.Object key)
Returns true if the storage contains an entry associated with the given key.
|
void |
init(InitializationContext ctx)
Used to initialize a cache loader.
|
default boolean |
isAvailable() |
MarshalledEntry<K,V> |
load(java.lang.Object key)
Fetches an entry from the storage.
|
void init(InitializationContext ctx)
PersistenceManager
when setting up cache loaders.PersistenceException - in case of an error, e.g. communicating with the external storageMarshalledEntry<K,V> load(java.lang.Object key)
MarshalledEntry needs to be created here, InitializationContext.getMarshalledEntryFactory() and InitializationContext.getByteBufferFactory() should be used.PersistenceException - in case of an error, e.g. communicating with the external storageboolean contains(java.lang.Object key)
PersistenceException - in case of an error, e.g. communicating with the external storagedefault boolean isAvailable()