|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.cache.loader.CacheLoaderManager
public class CacheLoaderManager
Manages all cache loader funxtionality. This class is typically initialised with an XML DOM Element,
represeting a cache loader configuration, or a CacheLoaderConfig
object.
Usage:
CacheLoaderManager manager = new CacheLoaderManager();
manager.setConfig(myXmlSnippet, myTreeCache);
CacheLoader loader = manager.getCacheLoader();
The XML configuration passed in would typically look like:
Constructor Summary | |
---|---|
CacheLoaderManager()
|
Method Summary | |
---|---|
CacheLoader |
getCacheLoader()
Returns the cache loader |
CacheLoaderConfig |
getCacheLoaderConfig()
Returns the configuration element of the cache loaders |
boolean |
isFetchPersistentState()
Returns true if at least one of the configured cache loaders has set fetchPersistentState to true. |
boolean |
isPassivation()
Tests if we're using passivation |
void |
preload(Fqn fqn,
boolean preloadParents,
boolean preloadChildren)
Preloads a specific Fqn into the cache from the configured cacheloader |
void |
preloadCache()
Performs a preload on the cache based on the cache loader preload configs used when configuring the cache. |
void |
setCacheLoader(CacheLoader loader)
Overrides generated cache loader with the one provided,for backward compat. |
void |
setConfig(CacheLoaderConfig config,
TreeCache cache)
Sets a configuration object and creates a cacheloader accordingly. |
void |
setConfig(org.w3c.dom.Element cacheLoaderConfig,
TreeCache cache)
Creates a cache loader based on an XML element passed in. |
void |
startCacheLoader()
|
void |
stopCacheLoader()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CacheLoaderManager()
Method Detail |
---|
public void setConfig(org.w3c.dom.Element cacheLoaderConfig, TreeCache cache) throws java.lang.Exception
cacheLoaderConfig
-
java.lang.Exception
public void setConfig(CacheLoaderConfig config, TreeCache cache) throws java.lang.Exception
config
- cache
-
java.lang.Exception
public void preloadCache() throws java.lang.Exception
java.lang.Exception
public void preload(Fqn fqn, boolean preloadParents, boolean preloadChildren) throws java.lang.Exception
fqn
- fqn to preloadpreloadParents
- whether we preload parentspreloadChildren
- whether we preload children
java.lang.Exception
public CacheLoaderConfig getCacheLoaderConfig()
public CacheLoader getCacheLoader()
public void setCacheLoader(CacheLoader loader)
loader
- public boolean isPassivation()
public boolean isFetchPersistentState()
public void stopCacheLoader()
public void startCacheLoader() throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |