org.jboss.cache.loader
Class LocalDelegatingCacheLoader
java.lang.Object
org.jboss.cache.loader.AbstractCacheLoader
org.jboss.cache.loader.DelegatingCacheLoader
org.jboss.cache.loader.LocalDelegatingCacheLoader
- All Implemented Interfaces:
- CacheLoader
public class LocalDelegatingCacheLoader
- extends DelegatingCacheLoader
DelegatingCacheLoader implementation which delegates to a local (in the same VM) CacheImpl. Sample code:
CacheImpl firstLevel=new CacheImpl();
CacheImpl secondLevel=new CacheImpl();
DelegatingCacheLoader l=new DelegatingCacheLoader(secondLevel);
l.setCache(firstLevel);
firstLevel.setCacheLoader(l);
secondLevel.start();
firstLevel.start();
- Version:
- $Id: LocalDelegatingCacheLoader.java,v 1.16 2007/06/14 15:30:15 msurtani Exp $
- Author:
- Bela Ban, Daniel Gredler
Fields inherited from class org.jboss.cache.loader.DelegatingCacheLoader |
delegateExists, delegateGet, delegateGetChildrenNames, delegateGetKey, delegateLoadEntireState, delegatePut, delegatePutKeyVal, delegateRemove, delegateRemoveData, delegateRemoveKey, delegateStoreEntireState, putList |
Methods inherited from class org.jboss.cache.loader.DelegatingCacheLoader |
commit, create, destroy, exists, get, getChildrenNames, loadEntireState, loadState, prepare, put, put, put, remove, remove, removeData, rollback, start, stop, storeEntireState, storeState |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LocalDelegatingCacheLoader
public LocalDelegatingCacheLoader()
LocalDelegatingCacheLoader
public LocalDelegatingCacheLoader(CacheImpl delegate)
setConfig
public void setConfig(CacheLoaderConfig.IndividualCacheLoaderConfig config)
- Description copied from interface:
CacheLoader
- Sets the configuration. This is called before
CacheLoader.create()
and CacheLoader.start()
.
- Parameters:
config
- May be an instance of the CacheLoaderConfig.IndividualCacheLoaderConfig
base
class, in which case the cache loader should use the
CacheLoaderConfig.IndividualCacheLoaderConfig.getProperties()
method to find configuration information. Alternatively,
may be a type-specific subclass of CacheLoaderConfig.IndividualCacheLoaderConfig
,
if there is one.
getConfig
public CacheLoaderConfig.IndividualCacheLoaderConfig getConfig()
- Description copied from interface:
CacheLoader
- Gets the configuration.
- Returns:
- the configuration, represented by a
CacheLoaderConfig.IndividualCacheLoaderConfig
object.
delegateGetChildrenNames
protected java.util.Set delegateGetChildrenNames(Fqn fqn)
throws java.lang.Exception
- Specified by:
delegateGetChildrenNames
in class DelegatingCacheLoader
- Throws:
java.lang.Exception
delegateGet
protected java.util.Map delegateGet(Fqn name)
throws java.lang.Exception
- Specified by:
delegateGet
in class DelegatingCacheLoader
- Throws:
java.lang.Exception
setDelegateCache
protected void setDelegateCache(CacheImpl delegate)
delegateExists
protected boolean delegateExists(Fqn name)
throws java.lang.Exception
- Specified by:
delegateExists
in class DelegatingCacheLoader
- Throws:
java.lang.Exception
delegatePut
protected java.lang.Object delegatePut(Fqn name,
java.lang.Object key,
java.lang.Object value)
throws java.lang.Exception
- Specified by:
delegatePut
in class DelegatingCacheLoader
- Throws:
java.lang.Exception
delegatePut
protected void delegatePut(Fqn name,
java.util.Map attributes)
throws java.lang.Exception
- Specified by:
delegatePut
in class DelegatingCacheLoader
- Throws:
java.lang.Exception
delegateRemove
protected java.lang.Object delegateRemove(Fqn name,
java.lang.Object key)
throws java.lang.Exception
- Specified by:
delegateRemove
in class DelegatingCacheLoader
- Throws:
java.lang.Exception
delegateRemove
protected void delegateRemove(Fqn name)
throws java.lang.Exception
- Specified by:
delegateRemove
in class DelegatingCacheLoader
- Throws:
java.lang.Exception
delegateRemoveData
protected void delegateRemoveData(Fqn name)
throws java.lang.Exception
- Specified by:
delegateRemoveData
in class DelegatingCacheLoader
- Throws:
java.lang.Exception
delegateLoadEntireState
protected void delegateLoadEntireState(java.io.ObjectOutputStream os)
throws java.lang.Exception
- Specified by:
delegateLoadEntireState
in class DelegatingCacheLoader
- Throws:
java.lang.Exception
delegateLoadState
protected void delegateLoadState(Fqn subtree,
java.io.ObjectOutputStream os)
throws java.lang.Exception
- Specified by:
delegateLoadState
in class DelegatingCacheLoader
- Throws:
java.lang.Exception
delegateStoreEntireState
protected void delegateStoreEntireState(java.io.ObjectInputStream is)
throws java.lang.Exception
- Specified by:
delegateStoreEntireState
in class DelegatingCacheLoader
- Throws:
java.lang.Exception
delegateStoreState
protected void delegateStoreState(Fqn subtree,
java.io.ObjectInputStream is)
throws java.lang.Exception
- Specified by:
delegateStoreState
in class DelegatingCacheLoader
- Throws:
java.lang.Exception