|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ehcache.EhcacheManager
public class EhcacheManager
Constructor Summary | |
---|---|
EhcacheManager(Configuration config)
|
|
EhcacheManager(Configuration config,
ServiceLocator serviceLocator)
|
|
EhcacheManager(Configuration config,
ServiceLocator serviceLocator,
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. |
|
org.terracotta.statistics.StatisticsManager |
getStatisticsManager()
|
|
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, ServiceLocator serviceLocator)
public EhcacheManager(Configuration config, ServiceLocator serviceLocator, boolean useLoaderInAtomics)
Method Detail |
---|
public org.terracotta.statistics.StatisticsManager getStatisticsManager()
public <K,V> Cache<K,V> getCache(java.lang.String alias, java.lang.Class<K> keyType, java.lang.Class<V> valueType)
CacheManager
Cache
associated with the given alias, if one is known.
getCache
in interface CacheManager
K
- 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)
CacheManager
Cache
associated with the alias provided, if oe is known.
When the cache is removed, it will release all resources it used.
removeCache
in interface CacheManager
alias
- 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
CacheManager
Cache
in this CacheManager
according to the specified CacheConfiguration
.
createCache
in interface CacheManager
K
- 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 CacheManager
public Status getStatus()
CacheManager
Status
for this CacheManager
getStatus
in interface CacheManager
Status
public void close()
CacheManager
Cache
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 CacheManager
public Maintainable toMaintenance()
PersistentCacheManager
PersistentCacheManager
toMaintenance
in interface PersistentCacheManager
Maintainable
for this PersistentCacheManager
public void destroyCache(java.lang.String alias) throws CachePersistenceException
PersistentCacheManager
Cache
instance managed
by this CacheManager
destroyCache
in interface PersistentCacheManager
alias
- 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 |