public class CacheManagerImpl
extends org.cache2k.CacheManager
| Modifier and Type | Field and Description |
|---|---|
static org.cache2k.spi.Cache2kCoreProvider |
PROVIDER |
| Constructor and Description |
|---|
CacheManagerImpl(Cache2kCoreProviderImpl _provider,
ClassLoader cl,
String _name,
boolean _default) |
| Modifier and Type | Method and Description |
|---|---|
void |
cacheDestroyed(org.cache2k.Cache c)
Called from the cache during close()
|
static void |
checkName(String s)
Don't accept a cache or manager names with too weird characters.
|
void |
clear() |
void |
close()
The shutdown takes place in two phases.
|
<K,V> org.cache2k.Cache<K,V> |
createCache(org.cache2k.configuration.Cache2kConfiguration<K,V> cfg) |
Iterable<org.cache2k.Cache> |
getActiveCaches() |
<K,V> org.cache2k.Cache<K,V> |
getCache(String name) |
static Iterable<CacheLifeCycleListener> |
getCacheLifeCycleListeners() |
ClassLoader |
getClassLoader() |
Iterable<String> |
getConfiguredCacheNames() |
Object |
getLockObject()
Used for JSR107 cache manager implementation
|
String |
getName() |
Properties |
getProperties() |
Cache2kCoreProviderImpl |
getProvider() |
String |
getVersion() |
boolean |
isClosed() |
boolean |
isDefaultManager() |
String |
newCache(InternalCache c,
String _requestedName) |
void |
sendCreatedEvent(org.cache2k.Cache c,
org.cache2k.configuration.Cache2kConfiguration _configuration) |
String |
toString() |
public CacheManagerImpl(Cache2kCoreProviderImpl _provider, ClassLoader cl, String _name, boolean _default)
public static Iterable<CacheLifeCycleListener> getCacheLifeCycleListeners()
public void sendCreatedEvent(org.cache2k.Cache c,
org.cache2k.configuration.Cache2kConfiguration _configuration)
public static void checkName(String s)
Cache2kBuilder.name(String)public String newCache(InternalCache c, String _requestedName)
IllegalStateException - if cache manager was closed or is closingIllegalStateException - if cache already createdpublic void cacheDestroyed(org.cache2k.Cache c)
public boolean isDefaultManager()
isDefaultManager in class org.cache2k.CacheManagerpublic String getName()
getName in class org.cache2k.CacheManagerpublic Iterable<org.cache2k.Cache> getActiveCaches()
getActiveCaches in class org.cache2k.CacheManagerpublic Iterable<String> getConfiguredCacheNames()
getConfiguredCacheNames in class org.cache2k.CacheManagerpublic <K,V> org.cache2k.Cache<K,V> getCache(String name)
getCache in class org.cache2k.CacheManagerpublic <K,V> org.cache2k.Cache<K,V> createCache(org.cache2k.configuration.Cache2kConfiguration<K,V> cfg)
createCache in class org.cache2k.CacheManagerpublic void clear()
clear in class org.cache2k.CacheManagerpublic void close()
Rationale exception handling: Exceptions on shutdown just could silently ignored, because a shutdown is done any way. Exceptions could be happened long before in a parallel task, shutdown is the last point where this could be propagated to the application. Silently ignoring is bad anyway, because this will cause that serious problems keep undetected. The exception and error handling within the cache tries everything that exceptions will be routed through as early and directly as possible.
close in interface Closeableclose in interface AutoCloseableclose in class org.cache2k.CacheManagerpublic Properties getProperties()
getProperties in class org.cache2k.CacheManagerpublic ClassLoader getClassLoader()
getClassLoader in class org.cache2k.CacheManagerpublic String getVersion()
public Cache2kCoreProviderImpl getProvider()
public boolean isClosed()
isClosed in class org.cache2k.CacheManagerpublic Object getLockObject()
cache2k API documentation. Copyright © 2000–2019 headissue GmbH, Munich.