|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jtheque.core.managers.cache.CacheManager
public final class CacheManager
A cache manager implementation.
Constructor Summary | |
---|---|
CacheManager()
|
Method Summary | |
---|---|
void |
addCache(org.jtheque.core.managers.cache.CacheConfiguration config)
Add a cache. |
boolean |
cacheExists(java.lang.String name)
Indicate if a cache exists with the specified name or not. |
void |
close()
Close the manager. |
net.sf.ehcache.Cache |
getCache(java.lang.String name)
Return the cache with the specificied name. |
void |
init()
Init the manager. |
boolean |
isEnabled()
Indicate if the manager is enabled or not. |
void |
preInit()
Pre-init the manager. |
void |
removeCache(java.lang.String name)
Remove the cache with the specified name. |
void |
setEnabled(boolean enabled)
Enable or disable the manager. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CacheManager()
Method Detail |
---|
public void preInit()
IManager
preInit
in interface IManager
public void init() throws ManagerException
IManager
init
in interface IManager
ManagerException
- If an error occurs during the init process.public void close() throws ManagerException
IManager
close
in interface IManager
ManagerException
- If an error occurs during the close process.public boolean isEnabled()
ActivableManager
isEnabled
in interface ActivableManager
public void setEnabled(boolean enabled)
ActivableManager
setEnabled
in interface ActivableManager
enabled
- true if we want enable the manager else false.public void addCache(org.jtheque.core.managers.cache.CacheConfiguration config)
ICacheManager
addCache
in interface ICacheManager
config
- The configuration of the cache.public net.sf.ehcache.Cache getCache(java.lang.String name)
ICacheManager
getCache
in interface ICacheManager
name
- The name of the cache.
public boolean cacheExists(java.lang.String name)
ICacheManager
cacheExists
in interface ICacheManager
name
- The name of the cache to search for.
public void removeCache(java.lang.String name)
ICacheManager
removeCache
in interface ICacheManager
name
- The name of the cache to remove.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |