K
- the type of the Cache
keysV
- the type of the Cache
valuesC
- the type of the Cache
configurationpublic abstract class AbstractCoherenceBasedCache<K,V,C extends CoherenceBasedConfiguration<K,V>> extends Object implements CoherenceBasedCache<K,V>
CoherenceBasedCache
.Modifier and Type | Field and Description |
---|---|
protected C |
m_configuration
The
Configuration for the CoherenceBasedCache . |
protected CoherenceBasedCacheManager |
m_manager
The
CoherenceBasedCacheManager that owns the Cache . |
protected NamedCache |
m_namedCache
The underlying
NamedCache that holds then entries for the CoherenceBasedCache . |
protected String |
m_sJCacheName
The
Cache name of the CoherenceBasedCache . |
JCACHE_CONFIG_BACK_SCHEME_NAME, JCACHE_CONFIG_BACK_SCHEME_SERVICE_NAME, JCACHE_CONFIG_CACHE_NAME, JCACHE_CONFIG_SCHEME_NAME, JCACHE_CONFIG_SERVICE_NAME, JCACHE_EXTEND_PROXY_SERVICE_NAME, JCACHE_EXTEND_SCHEME_NAME, JCACHE_EXTEND_SERVICE_NAME, JCACHE_LOCAL_CACHE_NAME_PATTERN, JCACHE_LOCAL_CACHE_NAME_PREFIX, JCACHE_LOCAL_SCHEME_NAME, JCACHE_LOCAL_SERVICE_NAME, JCACHE_PARTITIONED_CACHE_NAME_PATTERN, JCACHE_PARTITIONED_CACHE_NAME_PREFIX, JCACHE_PARTITIONED_SCHEME_NAME, JCACHE_PARTITIONED_SERVICE_NAME, JCACHE_REMOTE_SCHEME
Constructor and Description |
---|
AbstractCoherenceBasedCache(CoherenceBasedCacheManager manager,
String sJCacheName,
C configuration)
Constructs an
AbstractCoherenceBasedCache . |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected void |
ensureOpen()
Ensures that the
CoherenceBasedCache is open (not closed). |
javax.cache.CacheManager |
getCacheManager() |
protected ClassLoader |
getClassLoader()
Determine the
ClassLoader to use for the CoherenceBasedCache . |
<T extends javax.cache.configuration.Configuration<K,V>> |
getConfiguration(Class<T> clz) |
abstract JCacheIdentifier |
getIdentifier()
Obtain the internal identifier used for JCache caches.
|
abstract javax.cache.management.CacheMXBean |
getMBean()
Get JMX Bean associated with Cache.
|
String |
getName() |
abstract JCacheStatistics |
getStatistics()
Get JCache Statistics associated with Cache.
|
boolean |
isClosed() |
abstract boolean |
isStatisticsEnabled()
Get JCache Statistics status
|
abstract void |
onBeforeClosing()
Closes a
CoherenceBasedCache at the request of a call to
Cache.close() . |
abstract void |
setManagementEnabled(boolean fEnabled)
Set JCache Management status.
|
abstract void |
setStatisticsEnabled(boolean fEnabled)
Set JCache statistics status
|
<T> T |
unwrap(Class<T> clz) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
destroy
clear, containsKey, deregisterCacheEntryListener, get, getAll, getAndPut, getAndRemove, getAndReplace, invoke, invokeAll, iterator, loadAll, put, putAll, putIfAbsent, registerCacheEntryListener, remove, remove, removeAll, removeAll, replace, replace
forEach, spliterator
protected CoherenceBasedCacheManager m_manager
CoherenceBasedCacheManager
that owns the Cache
.protected String m_sJCacheName
Cache
name of the CoherenceBasedCache
.protected NamedCache m_namedCache
NamedCache
that holds then entries for the CoherenceBasedCache
.protected C extends CoherenceBasedConfiguration<K,V> m_configuration
Configuration
for the CoherenceBasedCache
.public AbstractCoherenceBasedCache(CoherenceBasedCacheManager manager, String sJCacheName, C configuration)
AbstractCoherenceBasedCache
.manager
- the CoherenceBasedCacheManager
that owns the CoherenceBasedCache
sJCacheName
- the name of the Cache
configuration
- the CoherenceBasedConfiguration
for the Cache
public void close()
public <T extends javax.cache.configuration.Configuration<K,V>> T getConfiguration(Class<T> clz)
public javax.cache.CacheManager getCacheManager()
protected void ensureOpen() throws IllegalStateException
CoherenceBasedCache
is open (not closed).IllegalStateException
- if the CoherenceBasedCache
is closedpublic abstract void onBeforeClosing()
CoherenceBasedCache
at the request of a call to
Cache.close()
.protected ClassLoader getClassLoader()
ClassLoader
to use for the CoherenceBasedCache
.ClassLoader
public abstract javax.cache.management.CacheMXBean getMBean()
public abstract JCacheStatistics getStatistics()
public abstract void setManagementEnabled(boolean fEnabled)
fEnabled
- true to enablepublic abstract void setStatisticsEnabled(boolean fEnabled)
fEnabled
- true to enablepublic abstract boolean isStatisticsEnabled()
public abstract JCacheIdentifier getIdentifier()
CoherenceBasedCache
getIdentifier
in interface CoherenceBasedCache<K,V>
JCacheIdentifier