public class CacheManager extends Object implements CacheManagerMBean
Cache. If you prefer you can call them on
this in stead.
Since 1.9.1 this class represents a singleton. Actually most methods should more logically not be
static any more.| Modifier and Type | Class and Description |
|---|---|
static class |
CacheManager.Bean<K,V> |
| Modifier and Type | Method and Description |
|---|---|
String |
clear(String pattern) |
String |
disable(String pattern) |
String |
enable(String pattern) |
static CacheManager.Bean |
getBean(String name)
Returns a cache wrapped in a 'Bean', so it is not a Map any more.
|
static Cache |
getCache(String name)
Returns the Cache with a certain name.
|
static Set<String> |
getCaches()
Returns the names of all caches.
|
static Set<CacheManager.Bean> |
getCaches(String className) |
static CacheManager |
getInstance() |
static Map<String,Cache<?,?>> |
getMap() |
static int |
getTotalByteSize() |
static <K,V> Cache<K,V> |
putCache(Cache<K,V> cache)
Puts a cache in the caches repository.
|
String |
readConfiguration() |
static Object |
remove(String name,
Object key)
Used in config/functions/caches.xml
|
static void |
shutdown()
Clears and dereferences all caches.
|
public static CacheManager getInstance()
public static Cache getCache(String name)
getCaches(java.lang.String)public static CacheManager.Bean getBean(String name)
public static Set<CacheManager.Bean> getCaches(String className)
public static Set<String> getCaches()
public static <K,V> Cache<K,V> putCache(Cache<K,V> cache)
cache - A cache.public static int getTotalByteSize()
public static void shutdown()
public String clear(String pattern)
clear in interface CacheManagerMBeanpublic String enable(String pattern)
enable in interface CacheManagerMBeanpublic String disable(String pattern)
disable in interface CacheManagerMBeanpublic String readConfiguration()
readConfiguration in interface CacheManagerMBeanMMBase 1.9-SNAPSHOT - ${javadoctimestamp}