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.Modifier and Type | Class and Description |
---|---|
protected class |
NearCachedClientMapProxy.ClientMapAddNearCacheEventHandler |
Modifier and Type | Field and Description |
---|---|
protected String |
invalidationListenerId |
protected NearCache<Data,Object> |
nearCache |
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 |
---|---|
protected void |
addNearCacheInvalidateListener() |
void |
addNearCacheInvalidateListener(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 keyData) |
protected V |
getInternal(Data keyData) |
LocalMapStats |
getLocalMapStats()
Returns LocalMapStats for this map.
|
NearCache<Data,Object> |
getNearCache() |
protected void |
init() |
protected void |
invalidateNearCache(Collection<Data> keys) |
protected void |
invalidateNearCache(Data key) |
void |
loadAll(boolean replaceExistingValues)
Loads all keys into the store.
|
protected void |
loadAllInternal(boolean replaceExistingValues,
Set<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,Map<Data,Data>> entryMap) |
protected Future<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 Future<V> |
removeAsyncInternal(Data keyData) |
protected com.hazelcast.client.impl.protocol.codec.MapRemoveCodec.ResponseParameters |
removeInternal(Data keyData) |
protected boolean |
removeInternal(Data keyData,
Data valueData) |
protected void |
removeNearCacheInvalidationListener() |
protected boolean |
replaceIfSameInternal(Data keyData,
Data oldValueData,
Data newValueData) |
protected V |
replaceInternal(Data keyData,
Data valueData) |
protected void |
setInternal(long ttl,
TimeUnit timeunit,
Data keyData,
Data valueData) |
Future |
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, containsKey, containsValue, delete, entrySet, entrySet, entrySetWithPagingPredicate, evict, executeOnEntries, executeOnEntries, executeOnKey, executeOnKeys, flush, forceUnlock, get, getAll, getAsync, getEntryView, getTimeInMillis, isEmpty, isLocked, keySet, keySet, loadAll, localKeySet, localKeySet, lock, lock, put, put, putAll, putAsync, putAsync, putIfAbsent, putIfAbsent, putTransient, remove, remove, removeAsync, removeEntryListener, removeInterceptor, removePartitionLostListener, replace, replace, set, set, size, submitToKey, submitToKey, toString, tryLock, tryLock, tryLock, tryPut, tryRemove, unlock, values, values
deregisterListener, destroy, equals, getClient, getContext, getId, getName, getPartitionKey, getServiceName, hashCode, invoke, invoke, invokeOnPartition, invokeOnPartitionInterruptibly, registerListener, setContext, throwExceptionIfNull, toData, toObject
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
destroy, getName, getPartitionKey, getServiceName
protected volatile String invalidationListenerId
protected void onInitialize()
ClientProxy
onInitialize
in class ClientProxy
protected void init()
protected boolean containsKeyInternal(Data keyData)
containsKeyInternal
in class ClientMapProxy<K,V>
protected V getInternal(Data keyData)
getInternal
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 deleteInternal(Data keyData)
deleteInternal
in class ClientMapProxy<K,V>
public ICompletableFuture<V> getAsyncInternal(Data keyData)
getAsyncInternal
in class ClientMapProxy<K,V>
protected Future<V> putAsyncInternal(long ttl, TimeUnit timeunit, Data keyData, Data valueData)
putAsyncInternal
in class ClientMapProxy<K,V>
protected Future<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, Set<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 Future 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,Map<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
protected void invalidateNearCache(Data key)
protected void invalidateNearCache(Collection<Data> keys)
protected void addNearCacheInvalidateListener()
public void addNearCacheInvalidateListener(EventHandler handler)
protected void removeNearCacheInvalidationListener()
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.