K - key typeV - value typepublic class ClientCacheProxy<K,V> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected CacheConfig<K,V> |
cacheConfig |
protected HazelcastClientCacheManager |
cacheManager |
protected ClientContext |
clientContext |
protected ILogger |
logger |
protected String |
name |
protected String |
nameWithPrefix |
protected NearCache<Data,Object> |
nearCache |
protected ConcurrentMap<Member,String> |
nearCacheInvalidationListeners |
protected NearCacheManager |
nearCacheManager |
protected String |
nearCacheMembershipRegistrationId |
| Constructor and Description |
|---|
ClientCacheProxy(CacheConfig<K,V> cacheConfig,
ClientContext clientContext,
HazelcastClientCacheManager cacheManager) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addListenerLocally(String regId,
javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration) |
void |
clear() |
protected void |
clearInternal() |
void |
close() |
protected void |
closeCacheLoader() |
protected void |
closeListeners() |
boolean |
containsKey(K key) |
void |
countDownCompletionLatch(int id) |
protected ICompletableFuture |
createCompletedFuture(Object value) |
protected EventHandler<Object> |
createHandler(CacheEventListenerAdaptor adaptor) |
void |
deregisterCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration) |
protected void |
deregisterCompletionLatch(Integer countDownLatchId) |
void |
destroy() |
protected void |
ensureOpen() |
V |
get(K key) |
V |
get(K key,
javax.cache.expiry.ExpiryPolicy expiryPolicy) |
Map<K,V> |
getAll(Set<? extends K> keys) |
Map<K,V> |
getAll(Set<? extends K> keys,
javax.cache.expiry.ExpiryPolicy expiryPolicy) |
V |
getAndPut(K key,
V value) |
V |
getAndPut(K key,
V value,
javax.cache.expiry.ExpiryPolicy expiryPolicy) |
ICompletableFuture<V> |
getAndPutAsync(K key,
V value) |
ICompletableFuture<V> |
getAndPutAsync(K key,
V value,
javax.cache.expiry.ExpiryPolicy expiryPolicy) |
V |
getAndRemove(K key) |
ICompletableFuture<V> |
getAndRemoveAsync(K key) |
V |
getAndReplace(K key,
V value) |
V |
getAndReplace(K key,
V value,
javax.cache.expiry.ExpiryPolicy expiryPolicy) |
ICompletableFuture<V> |
getAndReplaceAsync(K key,
V value) |
ICompletableFuture<V> |
getAndReplaceAsync(K key,
V value,
javax.cache.expiry.ExpiryPolicy expiryPolicy) |
ICompletableFuture<V> |
getAsync(K key) |
ICompletableFuture<V> |
getAsync(K key,
javax.cache.expiry.ExpiryPolicy expiryPolicy) |
javax.cache.CacheManager |
getCacheManager() |
<C extends javax.cache.configuration.Configuration<K,V>> |
getConfiguration(Class<C> clazz) |
protected Object |
getFromNearCache(Data keyData,
boolean async) |
protected Object |
getInternal(K key,
javax.cache.expiry.ExpiryPolicy expiryPolicy,
boolean async) |
CacheStatistics |
getLocalCacheStatistics() |
String |
getName() |
String |
getNameWithPrefix() |
protected <T> T |
getSafely(Future<T> future) |
protected void |
invalidateNearCache(Data key) |
protected <T> T |
invoke(ClientRequest req) |
protected <T> ICompletableFuture<T> |
invoke(ClientRequest req,
Data keyData,
boolean completionOperation) |
<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 |
isClosed() |
boolean |
isDestroyed() |
Iterator<javax.cache.Cache.Entry<K,V>> |
iterator() |
void |
loadAll(Set<? extends K> keys,
boolean replaceExistingValues,
javax.cache.integration.CompletionListener completionListener) |
void |
open() |
void |
put(K key,
V value) |
void |
put(K key,
V value,
javax.cache.expiry.ExpiryPolicy expiryPolicy) |
void |
putAll(Map<? extends K,? extends V> map) |
void |
putAll(Map<? extends K,? extends V> map,
javax.cache.expiry.ExpiryPolicy expiryPolicy) |
ICompletableFuture<Void> |
putAsync(K key,
V value) |
ICompletableFuture<Void> |
putAsync(K key,
V value,
javax.cache.expiry.ExpiryPolicy expiryPolicy) |
protected <T> ICompletableFuture<T> |
putAsyncInternal(K key,
V value,
javax.cache.expiry.ExpiryPolicy expiryPolicy,
boolean isGet,
boolean withCompletionEvent) |
boolean |
putIfAbsent(K key,
V value) |
boolean |
putIfAbsent(K key,
V value,
javax.cache.expiry.ExpiryPolicy expiryPolicy) |
ICompletableFuture<Boolean> |
putIfAbsentAsync(K key,
V value) |
ICompletableFuture<Boolean> |
putIfAbsentAsync(K key,
V value,
javax.cache.expiry.ExpiryPolicy expiryPolicy) |
protected ICompletableFuture<Boolean> |
putIfAbsentAsyncInternal(K key,
V value,
javax.cache.expiry.ExpiryPolicy expiryPolicy,
boolean withCompletionEvent) |
void |
registerCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration) |
protected Integer |
registerCompletionLatch(int count) |
boolean |
remove(K key) |
boolean |
remove(K key,
V oldValue) |
void |
removeAll() |
void |
removeAll(Set<? extends K> keys) |
protected void |
removeAllInternal(Set<? extends K> keys,
boolean isRemoveAll) |
ICompletableFuture<Boolean> |
removeAsync(K key) |
ICompletableFuture<Boolean> |
removeAsync(K key,
V oldValue) |
protected <T> ICompletableFuture<T> |
removeAsyncInternal(K key,
V oldValue,
boolean hasOldValue,
boolean isGet,
boolean withCompletionEvent) |
protected String |
removeListenerLocally(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration) |
boolean |
replace(K key,
V value) |
boolean |
replace(K key,
V value,
javax.cache.expiry.ExpiryPolicy expiryPolicy) |
boolean |
replace(K key,
V oldValue,
V newValue) |
boolean |
replace(K key,
V oldValue,
V newValue,
javax.cache.expiry.ExpiryPolicy expiryPolicy) |
ICompletableFuture<Boolean> |
replaceAsync(K key,
V value) |
ICompletableFuture<Boolean> |
replaceAsync(K key,
V value,
javax.cache.expiry.ExpiryPolicy expiryPolicy) |
ICompletableFuture<Boolean> |
replaceAsync(K key,
V oldValue,
V newValue) |
ICompletableFuture<Boolean> |
replaceAsync(K key,
V oldValue,
V newValue,
javax.cache.expiry.ExpiryPolicy expiryPolicy) |
protected <T> ICompletableFuture<T> |
replaceAsyncInternal(K key,
V oldValue,
V newValue,
javax.cache.expiry.ExpiryPolicy expiryPolicy,
boolean hasOldValue,
boolean isGet,
boolean withCompletionEvent) |
int |
size() |
protected void |
storeInNearCache(Data key,
Data valueData,
V value) |
protected void |
submitLoadAllTask(CacheLoadAllRequest request,
javax.cache.integration.CompletionListener completionListener) |
protected Data |
toData(Object o) |
protected <T> T |
toObject(Object data) |
<T> T |
unwrap(Class<T> clazz) |
protected void |
updateCacheListenerConfigOnOtherNodes(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration,
boolean isRegister) |
protected void |
validateCacheLoader(javax.cache.integration.CompletionListener completionListener) |
protected void |
waitCompletionLatch(Integer countDownLatchId,
ICompletableFuture future) |
protected void |
waitCompletionLatch(Integer countDownLatchId,
int offset,
ICompletableFuture future) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitopendestroy, isDestroyedprotected final ILogger logger
protected final HazelcastClientCacheManager cacheManager
protected final NearCacheManager nearCacheManager
protected String nearCacheMembershipRegistrationId
protected final ConcurrentMap<Member,String> nearCacheInvalidationListeners
protected final ClientContext clientContext
protected final CacheConfig<K,V> cacheConfig
protected final String name
protected final String nameWithPrefix
public ClientCacheProxy(CacheConfig<K,V> cacheConfig, ClientContext clientContext, HazelcastClientCacheManager cacheManager)
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 <C extends javax.cache.configuration.Configuration<K,V>> C getConfiguration(Class<C> clazz)
public <T> T invoke(K key, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object... arguments) throws javax.cache.processor.EntryProcessorException
javax.cache.processor.EntryProcessorExceptionpublic <T> Map<K,javax.cache.processor.EntryProcessorResult<T>> invokeAll(Set<? extends K> keys, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object... arguments)
public String getName()
public javax.cache.CacheManager getCacheManager()
public <T> T unwrap(Class<T> clazz)
public void registerCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)
public void deregisterCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)
protected void updateCacheListenerConfigOnOtherNodes(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration, boolean isRegister)
protected Object getInternal(K key, javax.cache.expiry.ExpiryPolicy expiryPolicy, boolean async)
public ICompletableFuture<V> getAsync(K key)
public ICompletableFuture<V> getAsync(K key, javax.cache.expiry.ExpiryPolicy expiryPolicy)
public ICompletableFuture<Void> putAsync(K key, V value)
public ICompletableFuture<Void> putAsync(K key, V value, javax.cache.expiry.ExpiryPolicy expiryPolicy)
public ICompletableFuture<Boolean> putIfAbsentAsync(K key, V value)
putIfAbsentAsync in interface ICache<K,V>public ICompletableFuture<Boolean> putIfAbsentAsync(K key, V value, javax.cache.expiry.ExpiryPolicy expiryPolicy)
putIfAbsentAsync in interface ICache<K,V>public ICompletableFuture<V> getAndPutAsync(K key, V value)
getAndPutAsync in interface ICache<K,V>public ICompletableFuture<V> getAndPutAsync(K key, V value, javax.cache.expiry.ExpiryPolicy expiryPolicy)
getAndPutAsync in interface ICache<K,V>public ICompletableFuture<Boolean> removeAsync(K key)
removeAsync in interface ICache<K,V>public ICompletableFuture<Boolean> removeAsync(K key, V oldValue)
removeAsync in interface ICache<K,V>public ICompletableFuture<V> getAndRemoveAsync(K key)
getAndRemoveAsync in interface ICache<K,V>public ICompletableFuture<Boolean> replaceAsync(K key, V value)
replaceAsync in interface ICache<K,V>public ICompletableFuture<Boolean> replaceAsync(K key, V value, javax.cache.expiry.ExpiryPolicy expiryPolicy)
replaceAsync in interface ICache<K,V>public ICompletableFuture<Boolean> replaceAsync(K key, V oldValue, V newValue)
replaceAsync in interface ICache<K,V>public ICompletableFuture<Boolean> replaceAsync(K key, V oldValue, V newValue, javax.cache.expiry.ExpiryPolicy expiryPolicy)
replaceAsync in interface ICache<K,V>public ICompletableFuture<V> getAndReplaceAsync(K key, V value)
getAndReplaceAsync in interface ICache<K,V>public ICompletableFuture<V> getAndReplaceAsync(K key, V value, javax.cache.expiry.ExpiryPolicy expiryPolicy)
getAndReplaceAsync in interface ICache<K,V>public void putAll(Map<? extends K,? extends V> map, javax.cache.expiry.ExpiryPolicy expiryPolicy)
public boolean putIfAbsent(K key, V value, javax.cache.expiry.ExpiryPolicy expiryPolicy)
putIfAbsent in interface ICache<K,V>public boolean replace(K key, V oldValue, V newValue, javax.cache.expiry.ExpiryPolicy expiryPolicy)
public V getAndReplace(K key, V value, javax.cache.expiry.ExpiryPolicy expiryPolicy)
getAndReplace in interface ICache<K,V>public CacheStatistics getLocalCacheStatistics()
getLocalCacheStatistics in interface ICache<K,V>public void close()
public void destroy()
protected <T> ICompletableFuture<T> invoke(ClientRequest req, Data keyData, boolean completionOperation)
protected <T> T getSafely(Future<T> future)
protected <T> ICompletableFuture<T> removeAsyncInternal(K key, V oldValue, boolean hasOldValue, boolean isGet, boolean withCompletionEvent)
protected <T> ICompletableFuture<T> replaceAsyncInternal(K key, V oldValue, V newValue, javax.cache.expiry.ExpiryPolicy expiryPolicy, boolean hasOldValue, boolean isGet, boolean withCompletionEvent)
protected <T> ICompletableFuture<T> putAsyncInternal(K key, V value, javax.cache.expiry.ExpiryPolicy expiryPolicy, boolean isGet, boolean withCompletionEvent)
protected ICompletableFuture<Boolean> putIfAbsentAsyncInternal(K key, V value, javax.cache.expiry.ExpiryPolicy expiryPolicy, boolean withCompletionEvent)
protected void clearInternal()
protected void invalidateNearCache(Data key)
protected void addListenerLocally(String regId, javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)
protected String removeListenerLocally(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)
protected void closeListeners()
public void countDownCompletionLatch(int id)
countDownCompletionLatch in interface CacheSyncListenerCompleterprotected Integer registerCompletionLatch(int count)
protected void deregisterCompletionLatch(Integer countDownLatchId)
protected void waitCompletionLatch(Integer countDownLatchId, ICompletableFuture future) throws ExecutionException
ExecutionExceptionprotected void waitCompletionLatch(Integer countDownLatchId, int offset, ICompletableFuture future) throws ExecutionException
ExecutionExceptionprotected EventHandler<Object> createHandler(CacheEventListenerAdaptor adaptor)
protected ICompletableFuture createCompletedFuture(Object value)
protected void ensureOpen()
public boolean isClosed()
public boolean isDestroyed()
public void open()
public String getNameWithPrefix()
protected <T> T toObject(Object data)
protected <T> T invoke(ClientRequest req)
protected void validateCacheLoader(javax.cache.integration.CompletionListener completionListener)
protected void closeCacheLoader()
protected void submitLoadAllTask(CacheLoadAllRequest request, javax.cache.integration.CompletionListener completionListener)
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.