@ThreadSafe public interface CacheLoader<K,V> extends Lifecycle
CacheWriter.| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(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.
|
MarshalledEntry<K,V> |
load(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(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(Object key)
PersistenceException - in case of an error, e.g. communicating with the external storageCopyright © 2017 JBoss, a division of Red Hat. All rights reserved.