|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ehcache.core.EhcacheManager
public class EhcacheManager
| Constructor Summary | |
|---|---|
EhcacheManager(Configuration config)
|
|
EhcacheManager(Configuration config,
java.util.Collection<Service> services)
|
|
EhcacheManager(Configuration config,
java.util.Collection<Service> services,
boolean useLoaderInAtomics)
|
|
| Method Summary | ||
|---|---|---|
void |
close()
Releases all data held in Cache instances managed by this CacheManager, as well as all
Service this instance provides to managed Cache instances. |
|
|
createCache(java.lang.String alias,
CacheConfiguration<K,V> config)
Creates a Cache in this CacheManager according to the specified CacheConfiguration. |
|
void |
deregisterListener(CacheManagerListener listener)
|
|
void |
destroyCache(java.lang.String alias)
Destroys all data persistent data associated with the aliased Cache instance managed
by this CacheManager |
|
|
getCache(java.lang.String alias,
java.lang.Class<K> keyType,
java.lang.Class<V> valueType)
Retrieves the Cache associated with the given alias, if one is known. |
|
RuntimeConfiguration |
getRuntimeConfiguration()
Returns the current RuntimeConfiguration used by this CacheManager |
|
Status |
getStatus()
Returns the current Status for this CacheManager |
|
void |
init()
Attempts at having this CacheManager go to Status.AVAILABLE, starting all
Service instances managed by this CacheManager, as well
as all Cache pre registered with it. |
|
void |
registerListener(CacheManagerListener listener)
|
|
void |
removeCache(java.lang.String alias)
Removes the Cache associated with the alias provided, if oe is known. |
|
Maintainable |
toMaintenance()
Lets you manipulate the persistent data structures for this PersistentCacheManager |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EhcacheManager(Configuration config)
public EhcacheManager(Configuration config,
java.util.Collection<Service> services)
public EhcacheManager(Configuration config,
java.util.Collection<Service> services,
boolean useLoaderInAtomics)
| Method Detail |
|---|
public <K,V> Cache<K,V> getCache(java.lang.String alias,
java.lang.Class<K> keyType,
java.lang.Class<V> valueType)
CacheManagerCache associated with the given alias, if one is known.
getCache in interface CacheManagerK - the type of the keys used to access data within this cacheV - the type of the values held within this cachealias - the alias under which to look the Cache upkeyType - the Cache key classvalueType - the Cache value class
Cache associated with the given alias, null if no association existspublic void removeCache(java.lang.String alias)
CacheManagerCache associated with the alias provided, if oe is known.
When the cache is removed, it will release all resources it used.
removeCache in interface CacheManageralias - the alias for which to remove the Cache
public <K,V> Cache<K,V> createCache(java.lang.String alias,
CacheConfiguration<K,V> config)
throws java.lang.IllegalArgumentException
CacheManagerCache in this CacheManager according to the specified CacheConfiguration.
createCache in interface CacheManagerK - the type of the keys used to access data within this cacheV - the type of the values held within this cachealias - the alias under which the cache will be createdconfig - the configuration of the cache to create
Cache
java.lang.IllegalArgumentException - If there is already a cache registered with the given alias.public void registerListener(CacheManagerListener listener)
public void deregisterListener(CacheManagerListener listener)
public void init()
Status.AVAILABLE, starting all
Service instances managed by this CacheManager, as well
as all Cache pre registered with it.
Should this throw, while the CacheManager isn't yet Status.AVAILABLE, it will go back
to Status.UNINITIALIZED properly (i.e. closing all services it already started,
but which in turn may fail too).
init in interface CacheManagerpublic Status getStatus()
CacheManagerStatus for this CacheManager
getStatus in interface CacheManagerStatuspublic void close()
CacheManagerCache instances managed by this CacheManager, as well as all
Service this instance provides to managed Cache instances.
Should this throw, while the CacheManager isn't yet Status.UNINITIALIZED, it will keep on
trying to go to Status.UNINITIALIZED properly (i.e. closing all other services it didn't yet stop).
close in interface CacheManagerpublic RuntimeConfiguration getRuntimeConfiguration()
CacheManagerRuntimeConfiguration used by this CacheManager
getRuntimeConfiguration in interface CacheManagerpublic Maintainable toMaintenance()
PersistentCacheManagerPersistentCacheManager
toMaintenance in interface PersistentCacheManagerMaintainable for this PersistentCacheManager
public void destroyCache(java.lang.String alias)
throws CachePersistenceException
PersistentCacheManagerCache instance managed
by this CacheManager
destroyCache in interface PersistentCacheManageralias - the Cache's alias to destroy all persistent data from
CachePersistenceException - When something goes wrong destroying the persistent data
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||