public abstract class AbstractCacheLoader extends Object implements CacheLoader
CacheLoader
that holds common implementations for some methodsModifier 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, wait
getConfigurationClass, load, load, loadAll, loadAllKeys, start, stop
protected 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 CacheLoader
key
- key to testCacheLoaderException
- in the event of problems reading from sourcepublic void init(CacheLoaderConfig config, Cache<?,?> cache, StreamingMarshaller m) throws CacheLoaderException
CacheLoader
CacheLoaderManager
when setting up cache loaders.init
in interface CacheLoader
config
- 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.CacheLoaderException
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.