public abstract class AbstractCacheLoader extends Object implements CacheLoader
CacheLoader that holds common implementations for some methods| Modifier and Type | Field and Description |
|---|---|
protected Cache<Object,Object> |
cache |
protected StreamingMarshaller |
marshaller |
| Constructor and Description |
|---|
AbstractCacheLoader() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(Object key)
This implementation delegates to
CacheLoader.load(Object), to ensure that a response is
returned only if the entry is not expired. |
void |
init(CacheLoaderConfig config,
Cache<?,?> cache,
StreamingMarshaller m)
Used to initialize a cache loader.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConfigurationClass, load, load, loadAll, loadAllKeys, start, stopprotected volatile StreamingMarshaller marshaller
public boolean containsKey(Object key) throws CacheLoaderException
CacheLoader.load(Object), to ensure that a response is
returned only if the entry is not expired.containsKey in interface CacheLoaderkey - key to testCacheLoaderException - in the event of problems reading from sourcepublic void init(CacheLoaderConfig config, Cache<?,?> cache, StreamingMarshaller m) throws CacheLoaderException
CacheLoaderCacheLoaderManager
when setting up cache loaders.init in interface CacheLoaderconfig - the cache loader configuration beancache - cache associated with this cache loader. Implementations may use this to determine cache name when
selecting where refer to state in storage, for example, a different database table name.m - marshaller to use when loading state from a stream, if supported by the implementation.CacheLoaderExceptionCopyright © 2012 JBoss by Red Hat. All Rights Reserved.