|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.cache.loader.CacheLoaderManager
public class CacheLoaderManager
Manages all cache loader functionality. This class is typically initialised with an XML DOM Element,
represeting a cache loader configuration, or a CacheLoaderConfig
object.
CacheLoaderManager manager = new CacheLoaderManager();
manager.setConfig(myXmlSnippet, myTreeCache);
CacheLoader loader = manager.getCacheLoader();
The XML configuration passed in would typically look like:
false
/
org.jboss.cache.loader.FileCacheLoader
true
false
false
location=/tmp/file
]]>
Constructor Summary | |
---|---|
CacheLoaderManager()
|
Method Summary | |
---|---|
CacheLoader |
getCacheLoader()
Returns the cache loader |
CacheLoaderConfig |
getCacheLoaderConfig()
Returns the configuration element of the cache loaders |
void |
injectDependencies(CacheSPI cache,
Configuration configuration,
RegionManager regionManager,
ComponentRegistry registry)
|
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 |
purgeLoaders(boolean force)
|
protected void |
setCacheInLoader(CacheSPI c,
CacheLoader loader)
Sets the cache instance associated with the given cache loader. |
void |
setConfig(CacheLoaderConfig config,
CacheSPI cache,
Configuration configuration)
Sets a configuration object and creates a cacheloader accordingly. |
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 injectDependencies(CacheSPI cache, Configuration configuration, RegionManager regionManager, ComponentRegistry registry)
public void setConfig(CacheLoaderConfig config, CacheSPI cache, Configuration configuration) throws CacheException
config
- cache
-
CacheException
protected void setCacheInLoader(CacheSPI c, CacheLoader loader)
c
- instance of cache to be set in cache loaderloader
- cache loader to which assign the cache instancepublic void preloadCache() throws CacheException
Exception
CacheException
public void preload(Fqn fqn, boolean preloadParents, boolean preloadChildren) throws CacheException
fqn
- fqn to preloadpreloadParents
- whether we preload parentspreloadChildren
- whether we preload children
CacheException
- if we are unable to preloadpublic CacheLoaderConfig getCacheLoaderConfig()
public CacheLoader getCacheLoader()
public boolean isPassivation()
public boolean isFetchPersistentState()
public void stopCacheLoader()
public void startCacheLoader() throws CacheException
CacheException
public void purgeLoaders(boolean force) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |