public class JCacheLoaderAdapter<K,V> extends Object implements CacheLoader
| Constructor and Description |
|---|
JCacheLoaderAdapter() |
| 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 |
load(Object key)
Fetches an entry from the storage.
|
void |
setCacheLoader(javax.cache.integration.CacheLoader<K,V> delegate) |
void |
setExpiryPolicy(javax.cache.expiry.ExpiryPolicy expiryPolicy) |
void |
start() |
void |
stop() |
public void setExpiryPolicy(javax.cache.expiry.ExpiryPolicy expiryPolicy)
public void init(InitializationContext ctx)
CacheLoaderPersistenceManager
when setting up cache loaders.init in interface CacheLoaderpublic MarshalledEntry load(Object key) throws PersistenceException
CacheLoaderMarshalledEntry needs to be created here, InitializationContext.getMarshalledEntryFactory() and InitializationContext.getByteBufferFactory() should be used.load in interface CacheLoaderPersistenceException - in case of an error, e.g. communicating with the external storagepublic void start()
throws PersistenceException
start in interface LifecyclePersistenceExceptionpublic void stop()
throws PersistenceException
stop in interface LifecyclePersistenceExceptionpublic boolean contains(Object key)
CacheLoadercontains in interface CacheLoaderCopyright © 2014 JBoss, a division of Red Hat. All Rights Reserved.