public class Cache extends Object implements CacheMBean, Serializable
| Constructor and Description |
|---|
Cache(Ehcache cache)
A constructor for JCache.
|
| Modifier and Type | Method and Description |
|---|---|
void |
flush()
Flushes all cache items from memory to the disk store, and from the DiskStore to disk.
|
CacheConfiguration |
getCacheConfiguration()
Gets the JMX read-only CacheConfiguration
|
String |
getName()
Gets the cache name.
|
CacheStatistics |
getStatistics()
Gets the JMX cache statistics
|
String |
getStatus()
Gets the status attribute of the Cache.
|
boolean |
hasAbortedSizeOf()
May the cache contain elements which the SizeOf engine could not fully size?
|
boolean |
isTerracottaClustered()
Is the cache configured with Terracotta clustering?
|
void |
removeAll()
Removes all cached items.
|
public Cache(Ehcache cache) throws CacheException
ConfigurationFactory and clients can create these.
A client can specify their own settings here and pass the Ehcache object
into CacheManager.addCache(java.lang.String) to specify parameters other than the defaults.
Only the CacheManager can initialise them.cache - An ehcacheCacheExceptionpublic void removeAll()
throws IllegalStateException,
CacheException
removeAll in interface CacheMBeanIllegalStateException - if the cache is not Status.STATUS_ALIVECacheExceptionpublic void flush()
throws IllegalStateException,
CacheException
flush in interface CacheMBeanIllegalStateException - if the cache is not Status.STATUS_ALIVECacheExceptionpublic String getStatus()
getStatus in interface CacheMBeanpublic String getName()
getName in interface CacheMBeanpublic boolean isTerracottaClustered()
isTerracottaClustered in interface CacheMBeanpublic boolean hasAbortedSizeOf()
hasAbortedSizeOf in interface CacheMBeanpublic CacheConfiguration getCacheConfiguration()
getCacheConfiguration in interface CacheMBeanpublic CacheStatistics getStatistics()
getStatistics in interface CacheMBeanCopyright © 2003-2014 Terracotta, Inc.. All Rights Reserved.