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()
Invoked on component start
|
void |
stop()
Invoked on component 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
Lifecyclestart in interface LifecyclePersistenceExceptionpublic void stop()
throws PersistenceException
Lifecyclestop in interface LifecyclePersistenceExceptionpublic boolean contains(Object key)
CacheLoadercontains in interface CacheLoaderCopyright © 2024 JBoss, a division of Red Hat. All rights reserved.