K
- the type of the Cache
keysV
- the type of the Cache
valuespublic class PassThroughCache<K,V> extends AbstractCoherenceBasedCache<K,V,PassThroughCacheConfiguration<K,V>>
Cache
that delegates (ie: passed-through) requests directly
onto an existing Coherence NamedCache
.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 |
---|
PassThroughCache(CoherenceBasedCacheManager manager,
String sJCacheName,
PassThroughCacheConfiguration<K,V> configuration)
Constructs a
PassThroughCache |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(K key) |
void |
deregisterCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> configuration) |
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) |
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> configuration) |
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
|
close, ensureOpen, getCacheManager, getClassLoader, getConfiguration, getName, isClosed, unwrap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public PassThroughCache(CoherenceBasedCacheManager manager, String sJCacheName, PassThroughCacheConfiguration<K,V> configuration)
PassThroughCache
manager
- the CoherenceBasedCacheManager
that owns the Cache
sJCacheName
- the name of the JCache Cache
configuration
- the PassThroughCacheConfiguration
for the Cache
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> configuration)
public void deregisterCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> configuration)
public void destroy()
CoherenceBasedCache
CoherenceBasedCache
due to a request from a
CoherenceBasedCacheManager
.public void onBeforeClosing()
AbstractCoherenceBasedCache
CoherenceBasedCache
at the request of a call to
Cache.close()
.onBeforeClosing
in class AbstractCoherenceBasedCache<K,V,PassThroughCacheConfiguration<K,V>>
public javax.cache.management.CacheMXBean getMBean()
AbstractCoherenceBasedCache
getMBean
in class AbstractCoherenceBasedCache<K,V,PassThroughCacheConfiguration<K,V>>
public JCacheStatistics getStatistics()
AbstractCoherenceBasedCache
getStatistics
in class AbstractCoherenceBasedCache<K,V,PassThroughCacheConfiguration<K,V>>
public void setManagementEnabled(boolean fEnabled)
AbstractCoherenceBasedCache
setManagementEnabled
in class AbstractCoherenceBasedCache<K,V,PassThroughCacheConfiguration<K,V>>
fEnabled
- true to enablepublic void setStatisticsEnabled(boolean fEnabled)
AbstractCoherenceBasedCache
setStatisticsEnabled
in class AbstractCoherenceBasedCache<K,V,PassThroughCacheConfiguration<K,V>>
fEnabled
- true to enablepublic boolean isStatisticsEnabled()
AbstractCoherenceBasedCache
isStatisticsEnabled
in class AbstractCoherenceBasedCache<K,V,PassThroughCacheConfiguration<K,V>>
public JCacheIdentifier getIdentifier()
CoherenceBasedCache
getIdentifier
in interface CoherenceBasedCache<K,V>
getIdentifier
in class AbstractCoherenceBasedCache<K,V,PassThroughCacheConfiguration<K,V>>
JCacheIdentifier