public class CoherenceBasedCacheManager extends Object implements javax.cache.CacheManager, com.oracle.coherence.common.base.Disposable
CacheManager.| Constructor and Description |
|---|
CoherenceBasedCacheManager(CoherenceBasedCachingProvider provider,
ConfigurableCacheFactory ccf,
URI uri,
ClassLoader classLoader,
Properties properties)
Constructs a new
CoherenceBasedCacheManager. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Default implementation invokes
Disposable.dispose(), it is not recommended that this be overridden. |
<K,V,C extends javax.cache.configuration.Configuration<K,V>> |
createCache(String sJCacheName,
C cfgJCache) |
void |
destroyCache(String sName) |
void |
dispose()
Invoked when all resources owned by the implementer can safely be
released.
|
void |
enableManagement(String sName,
boolean fEnabled) |
void |
enableStatistics(String sName,
boolean fEnabled) |
javax.cache.Cache |
getCache(String sJCacheName) |
<K,V> javax.cache.Cache<K,V> |
getCache(String sJCacheName,
Class<K> clzKey,
Class<V> clzType) |
Iterable<String> |
getCacheNames() |
CoherenceBasedCompleteConfiguration |
getCacheToConfigurationMapping(JCacheIdentifier cacheId)
Provide access to meta cache that maps JCache cache names to JCache configuration.
|
javax.cache.spi.CachingProvider |
getCachingProvider() |
ClassLoader |
getClassLoader() |
ConfigurableCacheFactory |
getConfigurableCacheFactory()
Get ConfigurableCacheFactory context.
|
Properties |
getProperties() |
URI |
getURI() |
boolean |
isClosed() |
void |
putCacheToConfigurationMapping(JCacheIdentifier cacheId,
CoherenceBasedCompleteConfiguration config)
put entry with key of sName
|
void |
releaseCache(String sName)
release cache named
sName |
void |
removeCacheToConfigurationMapping(JCacheIdentifier cacheId)
remove entry with key of sName
|
String |
toString() |
<T> T |
unwrap(Class<T> clz) |
boolean |
validate()
Validate if configurations map is valid with this instance.
|
public CoherenceBasedCacheManager(CoherenceBasedCachingProvider provider, ConfigurableCacheFactory ccf, URI uri, ClassLoader classLoader, Properties properties)
CoherenceBasedCacheManager.provider - the CachingProvider that owns the CacheManagerccf - the ConfigurableCacheFactory to use for CoherenceBasedCachesuri - the URI of the CacheManager
(this must point to a valid Coherence Cache configuration file)classLoader - the ClassLoader to use for loading Cache
resources, including keys, values, loaders, writers etcproperties - the custom configuration Propertiespublic CoherenceBasedCompleteConfiguration getCacheToConfigurationMapping(JCacheIdentifier cacheId)
cacheId - JCache unique identifierpublic void putCacheToConfigurationMapping(JCacheIdentifier cacheId, CoherenceBasedCompleteConfiguration config)
cacheId - key of entry to put into _metaJCacheNameToConfigpublic void removeCacheToConfigurationMapping(JCacheIdentifier cacheId)
cacheId - key of entry to remove from _metaJCacheNameToConfigpublic javax.cache.spi.CachingProvider getCachingProvider()
getCachingProvider in interface javax.cache.CacheManagerpublic URI getURI()
getURI in interface javax.cache.CacheManagerpublic Properties getProperties()
getProperties in interface javax.cache.CacheManagerpublic ClassLoader getClassLoader()
getClassLoader in interface javax.cache.CacheManagerpublic <K,V,C extends javax.cache.configuration.Configuration<K,V>> javax.cache.Cache<K,V> createCache(String sJCacheName, C cfgJCache) throws IllegalArgumentException
createCache in interface javax.cache.CacheManagerIllegalArgumentExceptionpublic <K,V> javax.cache.Cache<K,V> getCache(String sJCacheName, Class<K> clzKey, Class<V> clzType)
getCache in interface javax.cache.CacheManagerpublic javax.cache.Cache getCache(String sJCacheName)
getCache in interface javax.cache.CacheManagerpublic Iterable<String> getCacheNames()
getCacheNames in interface javax.cache.CacheManagerpublic void destroyCache(String sName)
destroyCache in interface javax.cache.CacheManagerpublic void enableStatistics(String sName, boolean fEnabled)
enableStatistics in interface javax.cache.CacheManagerpublic void enableManagement(String sName, boolean fEnabled)
enableManagement in interface javax.cache.CacheManagerpublic void close()
com.oracle.coherence.common.base.DisposableDisposable.dispose(), it is not recommended that this be overridden.close in interface com.oracle.coherence.common.base.Disposableclose in interface Closeableclose in interface AutoCloseableclose in interface javax.cache.CacheManagerpublic void dispose()
com.oracle.coherence.common.base.DisposableOnce disposed of the object should no longer be considered to be usable.
Note the Disposable interface is compatible with try-with-resources which will automatically invoke this method.
dispose in interface com.oracle.coherence.common.base.Disposablepublic boolean isClosed()
isClosed in interface javax.cache.CacheManagerpublic <T> T unwrap(Class<T> clz)
unwrap in interface javax.cache.CacheManagerpublic ConfigurableCacheFactory getConfigurableCacheFactory()
ConfigurableCacheFactorypublic void releaseCache(String sName)
sNamesName - JCache Adapter map to releasepublic boolean validate()