| javax.cache.CacheManager
All known Subclasses: ri.cache.ReferenceCacheManager, ri.cache.AbstractCacheManager,
CacheManager | public interface CacheManager (Code) | | A container for caches.
The CacheManager maintains all aspects of the Cache lifecycle.
Caches are not started until they are added to a CacheManager
Each vendor will implement CacheManager. Multiple CacheManagers can run at the same time, be registered in
JNDI and so on.
|
getName | String getName()(Code) | | Gets the name of the CacheManager. This is useful for distinguishing multiple CacheManagers
the name, or the output of toString() if it is not set. See Also: CacheManager.toString() See Also: which uses either the name or Object.toString() |
getState | State getState()(Code) | | Gets the current state of the cache manager
The status value from the State enum class |
newCache | void newCache(String cacheName) throws CacheException(Code) | | Adds a
Cache based on the default cache parameters with the given name.
Memory and Disk stores will be configured for it and it will be added
to the map of caches.
Also notifies the CacheManagerListener after the cache was initialised and added.
It will be created with the defaultCache attributes specified in ehcache.xml
Parameters: cacheName - the name for the cache throws: CacheException - if there was an error creating the cache, for example because the cache already exists |
registerCache | void registerCache(String name, Cache cache) throws IllegalStateException, CacheException(Code) | | Adds a
Cache to the CacheManager.
Memory and Disk stores will be configured for it and it will be added to the map of caches.
Also notifies the CacheManagerEventListener after the cache was initialised and added.
Parameters: cache - throws: IllegalStateException - if the cache is not State.STARTED before this method is called. throws: CacheException - if there was an error adding the cache to the CacheManager, for example because the Cache already exists in the CacheManager |
shutdown | void shutdown()(Code) | | Shuts down the CacheManager.
|
|
|