public abstract class CacheManager extends Object implements Iterable<Cache>, Closeable
Modifier and Type | Field and Description |
---|---|
protected static String |
DEFAULT_MANAGER_NAME |
Constructor and Description |
---|
CacheManager() |
Modifier and Type | Method and Description |
---|---|
abstract void |
clear()
Clear all caches associated to this cache manager
|
abstract void |
close()
Free all resources from managed caches.
|
abstract void |
destroy()
Deprecated.
Use
close() |
abstract Cache |
getCache(String name) |
static String |
getDefaultName()
Name of the default cache manager, which is "default" by default.
|
static CacheManager |
getInstance()
Get the default cache manager for the current class loader
|
static CacheManager |
getInstance(String _name) |
abstract String |
getName() |
abstract boolean |
isDestroyed() |
abstract Iterator<Cache> |
iterator() |
static void |
setDefaultName(String defaultName)
Reset the manager name once on application startup.
|
protected static final String DEFAULT_MANAGER_NAME
public CacheManager()
public static String getDefaultName()
public static void setDefaultName(String defaultName)
public static CacheManager getInstance()
public static CacheManager getInstance(String _name)
public abstract void clear()
public abstract void close()
Cache.close()
methods. Calling this method is more effective,
since it tries to close all caches concurrently as fast as possible.close
in interface Closeable
close
in interface AutoCloseable
public abstract boolean isDestroyed()
cache2k API documentation. Copyright © 2000–2015 headissue GmbH, Munich.