K
- the key type for this IMap
proxy.V
- the value type for this IMap
proxy.public class NearCachedClientMapProxy<K,V> extends ClientMapProxy<K,V>
IMap
implementation which is fronted by a Near Cache.NULL_AGGREGATOR_IS_NOT_ALLOWED, NULL_KEY_IS_NOT_ALLOWED, NULL_LISTENER_IS_NOT_ALLOWED, NULL_PREDICATE_IS_NOT_ALLOWED, NULL_VALUE_IS_NOT_ALLOWED
name
Constructor and Description |
---|
NearCachedClientMapProxy(String serviceName,
String name) |
Modifier and Type | Method and Description |
---|---|
String |
addNearCacheInvalidationListener(EventHandler handler) |
void |
clear()
This method clears the map and invokes
MapStore.deleteAll(java.util.Collection<K>) deleteAll on MapStore which,
if connected to a database, will delete the records from that database. |
protected boolean |
containsKeyInternal(Data keyData) |
protected void |
deleteInternal(Data keyData) |
void |
evictAll()
Evicts all keys from this map except the locked ones.
|
protected boolean |
evictInternal(Data keyData) |
Object |
executeOnKeyInternal(Data keyData,
EntryProcessor entryProcessor) |
protected List<com.hazelcast.client.impl.protocol.codec.MapGetAllCodec.ResponseParameters> |
getAllInternal(Map<Integer,List<Data>> pIdToKeyData,
Map<K,V> result) |
ICompletableFuture<V> |
getAsyncInternal(Data key) |
ClientContext |
getClientContext() |
protected V |
getInternal(Data key) |
LocalMapStats |
getLocalMapStats()
Returns LocalMapStats for this map.
|
NearCache<Object,Object> |
getNearCache() |
void |
loadAll(boolean replaceExistingValues)
Loads all keys into the store.
|
protected void |
loadAllInternal(boolean replaceExistingValues,
Collection<Data> dataKeys) |
protected void |
onDestroy()
Called before proxy is destroyed.
|
protected void |
onInitialize()
Called when proxy is created.
|
protected void |
onShutdown()
Called before client shutdown.
|
protected Map<K,Object> |
prepareResult(Collection<Map.Entry<Data,Data>> entrySet) |
protected void |
putAllInternal(Map<Integer,List<Map.Entry<Data,Data>>> entryMap) |
protected ICompletableFuture<V> |
putAsyncInternal(long ttl,
TimeUnit timeunit,
Data keyData,
Data valueData) |
protected V |
putIfAbsentInternal(long ttl,
TimeUnit timeunit,
Data keyData,
Data valueData) |
protected V |
putInternal(long ttl,
TimeUnit timeunit,
Data keyData,
Data valueData) |
protected void |
putTransientInternal(long ttl,
TimeUnit timeunit,
Data keyData,
Data valueData) |
protected void |
removeAllInternal(Predicate predicate) |
protected ICompletableFuture<V> |
removeAsyncInternal(Data keyData) |
protected com.hazelcast.client.impl.protocol.codec.MapRemoveCodec.ResponseParameters |
removeInternal(Data keyData) |
protected boolean |
removeInternal(Data keyData,
Data valueData) |
protected boolean |
replaceIfSameInternal(Data keyData,
Data oldValueData,
Data newValueData) |
protected V |
replaceInternal(Data keyData,
Data valueData) |
protected ICompletableFuture<Void> |
setAsyncInternal(long ttl,
TimeUnit timeunit,
Data keyData,
Data valueData) |
protected void |
setInternal(long ttl,
TimeUnit timeunit,
Data keyData,
Data valueData) |
ICompletableFuture |
submitToKeyInternal(Data keyData,
EntryProcessor entryProcessor) |
void |
submitToKeyInternal(Data keyData,
EntryProcessor entryProcessor,
ExecutionCallback callback) |
protected boolean |
tryPutInternal(long timeout,
TimeUnit timeunit,
Data keyData,
Data valueData) |
protected boolean |
tryRemoveInternal(long timeout,
TimeUnit timeunit,
Data keyData) |
addEntryListener, addEntryListener, addEntryListener, addEntryListener, addEntryListener, addEntryListener, addEntryListener, addEntryListener, addIndex, addInterceptor, addLocalEntryListener, addLocalEntryListener, addLocalEntryListener, addLocalEntryListener, addLocalEntryListener, addLocalEntryListener, addPartitionLostListener, aggregate, aggregate, aggregate, aggregate, containsKey, containsValue, delete, entrySet, entrySet, entrySetWithPagingPredicate, evict, executeOnEntries, executeOnEntries, executeOnKey, executeOnKeys, flush, forceUnlock, get, getAll, getAsync, getEntryView, getQueryCache, getQueryCache, getQueryCache, getQueryCacheContext, getTimeInMillis, isEmpty, isLocked, iterator, keySet, keySet, loadAll, localKeySet, localKeySet, lock, lock, project, project, put, put, putAll, putAsync, putAsync, putIfAbsent, putIfAbsent, putTransient, remove, remove, removeAll, removeAsync, removeEntryListener, removeInterceptor, removePartitionLostListener, replace, replace, set, set, setAsync, setAsync, size, submitToKey, submitToKey, toString, tryLock, tryLock, tryLock, tryPut, tryRemove, unlock, values, values
deregisterListener, destroy, equals, getClient, getContext, getDistributedObjectName, getId, getName, getPartitionKey, getSerializationService, getServiceName, hashCode, invoke, invoke, invokeOnPartition, invokeOnPartitionInterruptibly, postDestroy, preDestroy, registerListener, setContext, toData, toObject
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAll
destroy, getName, getPartitionKey, getServiceName
protected void onInitialize()
ClientProxy
onInitialize
in class ClientMapProxy<K,V>
protected boolean containsKeyInternal(Data keyData)
containsKeyInternal
in class ClientMapProxy<K,V>
protected V getInternal(Data key)
getInternal
in class ClientMapProxy<K,V>
public ICompletableFuture<V> getAsyncInternal(Data key)
getAsyncInternal
in class ClientMapProxy<K,V>
protected com.hazelcast.client.impl.protocol.codec.MapRemoveCodec.ResponseParameters removeInternal(Data keyData)
removeInternal
in class ClientMapProxy<K,V>
protected boolean removeInternal(Data keyData, Data valueData)
removeInternal
in class ClientMapProxy<K,V>
protected void removeAllInternal(Predicate predicate)
removeAllInternal
in class ClientMapProxy<K,V>
protected void deleteInternal(Data keyData)
deleteInternal
in class ClientMapProxy<K,V>
protected ICompletableFuture<V> putAsyncInternal(long ttl, TimeUnit timeunit, Data keyData, Data valueData)
putAsyncInternal
in class ClientMapProxy<K,V>
protected ICompletableFuture<Void> setAsyncInternal(long ttl, TimeUnit timeunit, Data keyData, Data valueData)
setAsyncInternal
in class ClientMapProxy<K,V>
protected ICompletableFuture<V> removeAsyncInternal(Data keyData)
removeAsyncInternal
in class ClientMapProxy<K,V>
protected boolean tryRemoveInternal(long timeout, TimeUnit timeunit, Data keyData)
tryRemoveInternal
in class ClientMapProxy<K,V>
protected boolean tryPutInternal(long timeout, TimeUnit timeunit, Data keyData, Data valueData)
tryPutInternal
in class ClientMapProxy<K,V>
protected V putInternal(long ttl, TimeUnit timeunit, Data keyData, Data valueData)
putInternal
in class ClientMapProxy<K,V>
protected void putTransientInternal(long ttl, TimeUnit timeunit, Data keyData, Data valueData)
putTransientInternal
in class ClientMapProxy<K,V>
protected V putIfAbsentInternal(long ttl, TimeUnit timeunit, Data keyData, Data valueData)
putIfAbsentInternal
in class ClientMapProxy<K,V>
protected boolean replaceIfSameInternal(Data keyData, Data oldValueData, Data newValueData)
replaceIfSameInternal
in class ClientMapProxy<K,V>
protected V replaceInternal(Data keyData, Data valueData)
replaceInternal
in class ClientMapProxy<K,V>
protected void setInternal(long ttl, TimeUnit timeunit, Data keyData, Data valueData)
setInternal
in class ClientMapProxy<K,V>
protected boolean evictInternal(Data keyData)
evictInternal
in class ClientMapProxy<K,V>
public void evictAll()
IMap
IMap.clear()
method.
The EVICT_ALL event is fired for any registered listeners.
See MapEvictedListener.mapEvicted(MapEvent)
.evictAll
in interface IMap<K,V>
evictAll
in class ClientMapProxy<K,V>
IMap.clear()
public void loadAll(boolean replaceExistingValues)
IMap
protected void loadAllInternal(boolean replaceExistingValues, Collection<Data> dataKeys)
loadAllInternal
in class ClientMapProxy<K,V>
protected List<com.hazelcast.client.impl.protocol.codec.MapGetAllCodec.ResponseParameters> getAllInternal(Map<Integer,List<Data>> pIdToKeyData, Map<K,V> result)
getAllInternal
in class ClientMapProxy<K,V>
public LocalMapStats getLocalMapStats()
IMap
getLocalMapStats
in interface IMap<K,V>
getLocalMapStats
in class ClientMapProxy<K,V>
public Object executeOnKeyInternal(Data keyData, EntryProcessor entryProcessor)
executeOnKeyInternal
in class ClientMapProxy<K,V>
public ICompletableFuture submitToKeyInternal(Data keyData, EntryProcessor entryProcessor)
submitToKeyInternal
in class ClientMapProxy<K,V>
public void submitToKeyInternal(Data keyData, EntryProcessor entryProcessor, ExecutionCallback callback)
submitToKeyInternal
in class ClientMapProxy<K,V>
protected Map<K,Object> prepareResult(Collection<Map.Entry<Data,Data>> entrySet)
prepareResult
in class ClientMapProxy<K,V>
protected void putAllInternal(Map<Integer,List<Map.Entry<Data,Data>>> entryMap)
putAllInternal
in class ClientMapProxy<K,V>
public void clear()
IMap
MapStore.deleteAll(java.util.Collection<K>)
deleteAll on MapStore which,
if connected to a database, will delete the records from that database.
The MAP_CLEARED event is fired for any registered listeners.
See MapClearedListener.mapCleared(MapEvent)
.
To clear a map without calling MapStore.deleteAll(java.util.Collection<K>)
, use IMap.evictAll()
.protected void onDestroy()
ClientProxy
onDestroy
in class ClientProxy
protected void onShutdown()
ClientProxy
onShutdown
in class ClientProxy
public String addNearCacheInvalidationListener(EventHandler handler)
public ClientContext getClientContext()
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.