K - key typeV - value typepublic class PartitionedCache<K,V> extends AbstractCoherenceBasedCache<K,V,PartitionedCacheConfiguration<K,V>>
| Modifier and Type | Class and Description |
|---|---|
static class |
PartitionedCache.EntryIterator<K,V>
JCache Entry iterator
|
m_configuration, m_manager, m_namedCache, m_sJCacheNameJCACHE_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 |
|---|
PartitionedCache(CoherenceBasedCacheManager manager, String sJCacheName, PartitionedCacheConfiguration<K,V> configuration)
Constructs a
PartitionedCache configured by PartitionedCacheConfiguration in context of CoherenceBasedCacheManager with JCache name sJCacheName. |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(K key) |
void |
deregisterCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> config) |
void |
destroy()
Destroys a
CoherenceBasedCache due to a request from a CoherenceBasedCacheManager. |
static void |
destroyCache(CoherenceBasedCacheManager mgr, JCacheIdentifier id)
Destroy a partitioned cache when there is no PartitionedCache object.
|
static void |
destroyCache(CoherenceBasedCacheManager mgr, JCacheIdentifier id, NamedCache namedCache)
Destroy a partitioned cache.
|
V |
get(K key) |
Map<K,V> |
getAll(Set<? extends K> setKey) |
V |
getAndPut(K key, V value) |
V |
getAndRemove(K key) |
V |
getAndReplace(K key, V value) |
protected ClassLoader |
getClassLoader()
get class loader for this Cache
|
JCacheContext |
getContext()
Return current
JCacheContext |
JCacheIdentifier |
getIdentifier()
Obtain the internal identifier used for JCache caches.
|
javax.cache.management.CacheMXBean |
getMBean()
Get JMX Management Bean.
|
protected CopyOnWriteArraySet<CoherenceCacheEntryListenerRegistration<K,V>> |
getRegisteredAsynchronousEventListeners()
get asynchronous CacheEntryListenerRegistrations
|
protected CopyOnWriteArraySet<CoherenceCacheEntryListenerRegistration<K,V>> |
getRegisteredSynchronousEventListeners()
get synchronous CacheEntryListenerRegistrations
|
JCacheStatistics |
getStatistics()
Get JCache statistics
|
<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> setKey, javax.cache.processor.EntryProcessor<K,V,T> proc, Object... arguments) |
boolean |
isStatisticsEnabled()
Get JCache Statistics status
|
Iterator<javax.cache.Cache.Entry<K,V>> |
iterator() |
void |
loadAll(Set<? extends K> setKey, boolean fReplaceExistingValues, javax.cache.integration.CompletionListener listener) |
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) |
void |
putAll(Map<? extends K,? extends V> map, boolean fReplaceExistingValues, boolean fUseWriteThrough) |
boolean |
putIfAbsent(K key, V value) |
void |
registerCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> config) |
boolean |
remove(K key) |
boolean |
remove(K key, V value) |
void |
removeAll() |
void |
removeAll(Set<? extends K> keys) |
boolean |
replace(K key, V value) |
boolean |
replace(K key, V valueOrig, V value) |
void |
setManagementEnabled(boolean fEnabled)
Sets management enablement
|
void |
setStatisticsEnabled(boolean fEnabled)
Sets m_stats
|
protected void |
submit(Runnable task)
Requests a
FutureTask to be performed. |
String |
toString() |
close, ensureOpen, getCacheManager, getConfiguration, getName, isClosed, unwrapclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic PartitionedCache(CoherenceBasedCacheManager manager, String sJCacheName, PartitionedCacheConfiguration<K,V> configuration)
PartitionedCache configured by PartitionedCacheConfiguration in context of CoherenceBasedCacheManager with JCache name sJCacheName.manager - CacheManager manages the created PartitionedCache.sJCacheName - JCache cache name that must be unique within CoherenceBasedCacheManager contextconfiguration - JCache cache configurationpublic JCacheIdentifier getIdentifier()
CoherenceBasedCachegetIdentifier in interface CoherenceBasedCache<K,V>getIdentifier in class AbstractCoherenceBasedCache<K,V,PartitionedCacheConfiguration<K,V>>JCacheIdentifierpublic void destroy()
CoherenceBasedCacheCoherenceBasedCache due to a request from a CoherenceBasedCacheManager.public boolean containsKey(K key)
public void loadAll(Set<? extends K> setKey, boolean fReplaceExistingValues, javax.cache.integration.CompletionListener listener)
public void putAll(Map<? extends K,? extends V> map, boolean fReplaceExistingValues, boolean fUseWriteThrough)
map - mapfReplaceExistingValues - if false, do not update existing valuesfUseWriteThrough - is writer-through enabledpublic 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)
public <T> Map<K,javax.cache.processor.EntryProcessorResult<T>> invokeAll(Set<? extends K> setKey, javax.cache.processor.EntryProcessor<K,V,T> proc, Object... arguments)
public void registerCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> config)
public void deregisterCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> config)
public javax.cache.management.CacheMXBean getMBean()
getMBean in class AbstractCoherenceBasedCache<K,V,PartitionedCacheConfiguration<K,V>>public JCacheStatistics getStatistics()
getStatistics in class AbstractCoherenceBasedCache<K,V,PartitionedCacheConfiguration<K,V>>public void onBeforeClosing()
AbstractCoherenceBasedCacheCoherenceBasedCache at the request of a call to Cache.close().onBeforeClosing in class AbstractCoherenceBasedCache<K,V,PartitionedCacheConfiguration<K,V>>public boolean isStatisticsEnabled()
AbstractCoherenceBasedCacheisStatisticsEnabled in class AbstractCoherenceBasedCache<K,V,PartitionedCacheConfiguration<K,V>>protected ClassLoader getClassLoader()
getClassLoader in class AbstractCoherenceBasedCache<K,V,PartitionedCacheConfiguration<K,V>>protected void submit(Runnable task)
FutureTask to be performed.task - the FutureTask to be performedprotected CopyOnWriteArraySet<CoherenceCacheEntryListenerRegistration<K,V>> getRegisteredSynchronousEventListeners()
protected CopyOnWriteArraySet<CoherenceCacheEntryListenerRegistration<K,V>> getRegisteredAsynchronousEventListeners()
public void setStatisticsEnabled(boolean fEnabled)
setStatisticsEnabled in class AbstractCoherenceBasedCache<K,V,PartitionedCacheConfiguration<K,V>>fEnabled - true to enablepublic void setManagementEnabled(boolean fEnabled)
setManagementEnabled in class AbstractCoherenceBasedCache<K,V,PartitionedCacheConfiguration<K,V>>fEnabled - true if management should be fEnabledpublic JCacheContext getContext()
JCacheContextJCacheContextpublic static void destroyCache(CoherenceBasedCacheManager mgr, JCacheIdentifier id, NamedCache namedCache)
mgr - CoherenceBasedCacheManagerid - PartitionedCache external cache namenamedCache - Coherence NamedCachepublic static void destroyCache(CoherenceBasedCacheManager mgr, JCacheIdentifier id)
mgr - CoherenceBasedCacheManagerid - PartitionedCache external cache name