K
- key typeV
- value typepublic class RemoteCache<K,V> extends AbstractCoherenceBasedCache<K,V,RemoteCacheConfiguration<K,V>>
Cache
based on a Coherence <partitioned-cache>.m_configuration, m_manager, m_namedCache, m_sJCacheName
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 |
---|
RemoteCache(CoherenceBasedCacheManager manager, String sJCacheName, RemoteCacheConfiguration configuration)
Constructs a
RemoteCache configured by PartitionedCacheConfiguration in context of CoherenceBasedCacheManager with JCache name sJCacheName . |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
void |
close() |
boolean |
containsKey(K key) |
void |
deregisterCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration) |
void |
destroy()
Destroys a
CoherenceBasedCache due to a request from a CoherenceBasedCacheManager . |
V |
get(K key) |
Map<K,V> |
getAll(Set<? extends K> keys) |
V |
getAndPut(K key, V value) |
V |
getAndRemove(K key) |
V |
getAndReplace(K key, V value) |
<T extends javax.cache.configuration.Configuration<K,V>> |
getConfiguration(Class<T> clz) |
JCacheIdentifier |
getIdentifier()
Obtain the internal identifier used for JCache caches.
|
javax.cache.management.CacheMXBean |
getMBean()
Get JMX Bean associated with Cache.
|
JCacheStatistics |
getStatistics()
Get JCache Statistics associated with Cache.
|
<T> T |
invoke(K key, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object... arguments) |
<T> Map<K,javax.cache.processor.EntryProcessorResult<T>> |
invokeAll(Set<? extends K> keys, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object... arguments) |
boolean |
isStatisticsEnabled()
Get JCache Statistics status
|
Iterator<javax.cache.Cache.Entry<K,V>> |
iterator() |
void |
loadAll(Set<? extends K> keys, boolean replaceExistingValues, javax.cache.integration.CompletionListener completionListener) |
void |
onBeforeClosing()
Closes a
CoherenceBasedCache at the request of a call to Cache.close() . |
void |
put(K key, V value) |
void |
putAll(Map<? extends K,? extends V> map) |
boolean |
putIfAbsent(K key, V value) |
void |
registerCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration) |
boolean |
remove(K key) |
boolean |
remove(K key, V oldValue) |
void |
removeAll() |
void |
removeAll(Set<? extends K> keys) |
boolean |
replace(K key, V value) |
boolean |
replace(K key, V oldValue, V newValue) |
void |
setManagementEnabled(boolean fEnabled)
Set JCache Management status.
|
void |
setStatisticsEnabled(boolean fEnabled)
Set JCache statistics status
|
<T> T |
unwrap(Class<T> clz) |
ensureOpen, getCacheManager, getClassLoader, getName, isClosed
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public RemoteCache(CoherenceBasedCacheManager manager, String sJCacheName, RemoteCacheConfiguration configuration)
RemoteCache
configured by PartitionedCacheConfiguration
in context of CoherenceBasedCacheManager
with JCache name sJCacheName
.manager
- CacheManager manages the created RemoteCache.sJCacheName
- JCache cache name that must be unique within CoherenceBasedCacheManager
contextconfiguration
- remote JCache cache configurationpublic void onBeforeClosing()
AbstractCoherenceBasedCache
CoherenceBasedCache
at the request of a call to Cache.close()
.onBeforeClosing
in class AbstractCoherenceBasedCache<K,V,RemoteCacheConfiguration<K,V>>
public javax.cache.management.CacheMXBean getMBean()
AbstractCoherenceBasedCache
getMBean
in class AbstractCoherenceBasedCache<K,V,RemoteCacheConfiguration<K,V>>
public JCacheStatistics getStatistics()
AbstractCoherenceBasedCache
getStatistics
in class AbstractCoherenceBasedCache<K,V,RemoteCacheConfiguration<K,V>>
public void setManagementEnabled(boolean fEnabled)
AbstractCoherenceBasedCache
setManagementEnabled
in class AbstractCoherenceBasedCache<K,V,RemoteCacheConfiguration<K,V>>
fEnabled
- true to enablepublic void setStatisticsEnabled(boolean fEnabled)
AbstractCoherenceBasedCache
setStatisticsEnabled
in class AbstractCoherenceBasedCache<K,V,RemoteCacheConfiguration<K,V>>
fEnabled
- true to enablepublic boolean isStatisticsEnabled()
AbstractCoherenceBasedCache
isStatisticsEnabled
in class AbstractCoherenceBasedCache<K,V,RemoteCacheConfiguration<K,V>>
public JCacheIdentifier getIdentifier()
CoherenceBasedCache
getIdentifier
in interface CoherenceBasedCache<K,V>
getIdentifier
in class AbstractCoherenceBasedCache<K,V,RemoteCacheConfiguration<K,V>>
JCacheIdentifier
public void destroy()
CoherenceBasedCache
CoherenceBasedCache
due to a request from a CoherenceBasedCacheManager
.public boolean containsKey(K key)
public void loadAll(Set<? extends K> keys, boolean replaceExistingValues, javax.cache.integration.CompletionListener completionListener)
public boolean remove(K key)
public void removeAll()
public void clear()
public <T> T invoke(K key, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object... arguments) throws javax.cache.processor.EntryProcessorException
javax.cache.processor.EntryProcessorException
public <T> Map<K,javax.cache.processor.EntryProcessorResult<T>> invokeAll(Set<? extends K> keys, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object... arguments)
public void registerCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)
public void deregisterCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)
public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in interface javax.cache.Cache<K,V>
close
in class AbstractCoherenceBasedCache<K,V,RemoteCacheConfiguration<K,V>>
public <T extends javax.cache.configuration.Configuration<K,V>> T getConfiguration(Class<T> clz)
getConfiguration
in interface javax.cache.Cache<K,V>
getConfiguration
in class AbstractCoherenceBasedCache<K,V,RemoteCacheConfiguration<K,V>>
public <T> T unwrap(Class<T> clz)
unwrap
in interface javax.cache.Cache<K,V>
unwrap
in class AbstractCoherenceBasedCache<K,V,RemoteCacheConfiguration<K,V>>