K
- the key type for this IMap
proxy.V
- the value type for this IMap
proxy.public class NearCachedMapProxyImpl<K,V> extends MapProxyImpl<K,V>
IMap
implementation which is fronted by a Near Cache.Modifier and Type | Field and Description |
---|---|
protected LocalMapStatsImpl |
localMapStats |
protected String |
localMemberUuid |
protected LockProxySupport |
lockSupport |
protected MapConfig |
mapConfig |
protected MapServiceContext |
mapServiceContext |
protected String |
name |
protected static String |
NULL_AGGREGATOR_IS_NOT_ALLOWED |
protected static String |
NULL_KEY_IS_NOT_ALLOWED |
protected static String |
NULL_LISTENER_IS_NOT_ALLOWED |
protected static String |
NULL_PREDICATE_IS_NOT_ALLOWED |
protected static String |
NULL_PROJECTION_IS_NOT_ALLOWED |
protected static String |
NULL_VALUE_IS_NOT_ALLOWED |
protected MapOperationProvider |
operationProvider |
protected OperationService |
operationService |
protected IPartitionService |
partitionService |
protected PartitioningStrategy |
partitionStrategy |
protected SerializationService |
serializationService |
protected boolean |
statisticsEnabled |
protected Address |
thisAddress |
PARTITIONING_STRATEGY
Constructor and Description |
---|
NearCachedMapProxyImpl(String name,
MapService mapService,
NodeEngine nodeEngine,
MapConfig mapConfig) |
Modifier and Type | Method and Description |
---|---|
protected String |
addEntryListenerInternal(Object listener,
Data key,
boolean includeValue) |
protected String |
addEntryListenerInternal(Object listener,
Predicate predicate,
Data key,
boolean includeValue) |
void |
addIndex(String attribute,
boolean ordered) |
String |
addLocalEntryListenerInternal(Object listener) |
String |
addLocalEntryListenerInternal(Object listener,
Predicate predicate,
Data key,
boolean includeValue) |
String |
addMapInterceptorInternal(MapInterceptor interceptor) |
protected String |
addPartitionLostListenerInternal(MapPartitionLostListener listener) |
void |
clearInternal() |
protected boolean |
containsKeyInternal(Data keyData) |
boolean |
containsValueInternal(Data dataValue) |
protected <K> Iterable<Data> |
convertToData(Iterable<K> keys) |
protected void |
deleteInternal(Data key) |
protected void |
evictAllInternal() |
protected boolean |
evictInternal(Data key)
Evicts a key from a map.
|
void |
executeOnEntriesInternal(EntryProcessor entryProcessor,
Predicate predicate,
List<Data> resultingKeyValuePairs)
|
Data |
executeOnKeyInternal(Data key,
EntryProcessor entryProcessor) |
InternalCompletableFuture<Object> |
executeOnKeyInternal(Data key,
EntryProcessor entryProcessor,
ExecutionCallback<Object> callback) |
Map |
executeOnKeysInternal(Set<Data> keys,
EntryProcessor entryProcessor) |
void |
flush() |
protected void |
getAllObjectInternal(List<Data> keys,
List<Object> resultingKeyValuePairs) |
protected InternalCompletableFuture<Data> |
getAsyncInternal(Data key) |
protected EntryView |
getEntryViewInternal(Data key) |
protected Object |
getInternal(Data key) |
LocalMapStats |
getLocalMapStats() |
protected MapConfig |
getMapConfig() |
protected MapQueryEngine |
getMapQueryEngine() |
String |
getName()
Returns the unique name for this DistributedObject.
|
NearCache<Object,Object> |
getNearCache() |
MapOperationProvider |
getOperationProvider() |
PartitioningStrategy |
getPartitionStrategy() |
String |
getServiceName()
Returns the service name for this object.
|
protected long |
getTimeInMillis(long time,
TimeUnit timeunit) |
int |
getTotalBackupCount() |
void |
initialize() |
protected void |
invalidateCache(Collection<Data> keys) |
protected void |
invalidateCache(Data key) |
protected void |
invalidateCache(Iterable<Data> keys) |
protected void |
invokePutAllOperationFactory(Address address,
long size,
int[] partitions,
MapEntries[] entries) |
boolean |
isEmpty() |
protected boolean |
isMapStoreEnabled() |
protected boolean |
isOwn(Data key) |
void |
loadAllInternal(boolean replaceExistingValues) |
protected void |
loadInternal(Iterable<Data> keys,
boolean replaceExistingValues)
Maps keys to corresponding partitions and sends operations to them.
|
protected boolean |
preDestroy() |
protected void |
putAllInternal(Map<?,?> map)
This method will group all puts per partition and send a
PutAllPartitionAwareOperationFactory per member. |
protected InternalCompletableFuture<Data> |
putAsyncInternal(Data key,
Data value,
long ttl,
TimeUnit timeunit) |
protected Data |
putIfAbsentInternal(Data key,
Data value,
long ttl,
TimeUnit timeunit) |
protected Data |
putInternal(Data key,
Data value,
long ttl,
TimeUnit timeunit) |
protected void |
putTransientInternal(Data key,
Data value,
long ttl,
TimeUnit timeunit) |
protected void |
removeAllInternal(Predicate predicate) |
protected InternalCompletableFuture<Data> |
removeAsyncInternal(Data key) |
protected boolean |
removeEntryListenerInternal(String id) |
protected Data |
removeInternal(Data key) |
protected boolean |
removeInternal(Data key,
Data value) |
void |
removeMapInterceptorInternal(String id) |
protected boolean |
removePartitionLostListenerInternal(String id) |
protected Data |
replaceInternal(Data key,
Data value) |
protected boolean |
replaceInternal(Data key,
Data expect,
Data update) |
protected InternalCompletableFuture<Data> |
setAsyncInternal(Data key,
Data value,
long ttl,
TimeUnit timeunit) |
protected void |
setInternal(Data key,
Data value,
long ttl,
TimeUnit timeunit) |
void |
setOperationProvider(MapOperationProvider operationProvider) |
int |
size() |
protected Data |
toData(Object object,
PartitioningStrategy partitioningStrategy) |
protected <T> T |
toObject(Object object) |
protected boolean |
tryPutInternal(Data key,
Data value,
long timeout,
TimeUnit timeunit) |
protected boolean |
tryRemoveInternal(Data key,
long timeout,
TimeUnit timeunit) |
void |
waitUntilLoaded() |
addEntryListener, addEntryListener, addEntryListener, addEntryListener, addEntryListener, addEntryListener, addEntryListener, addEntryListener, addInterceptor, addLocalEntryListener, addLocalEntryListener, addLocalEntryListener, addLocalEntryListener, addLocalEntryListener, addLocalEntryListener, addPartitionLostListener, aggregate, aggregate, aggregate, aggregate, clear, clearMapOnly, containsKey, containsValue, delete, entrySet, entrySet, evict, evictAll, executeOnEntries, executeOnEntries, executeOnKey, executeOnKeys, forceUnlock, get, getAll, getAsync, getEntryView, getQueryCache, getQueryCache, getQueryCache, invoke, isLocked, iterator, keySet, keySet, loadAll, 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, submitToKey, submitToKey, toString, tryLock, tryLock, tryLock, tryPut, tryRemove, unlock, values, values
destroy, equals, getDistributedObjectName, getNameAsPartitionAwareData, getNodeEngine, getOperationService, getPartitionId, getPartitionKey, getService, hashCode, invalidate, invokeOnPartition, postDestroy, throwNotActiveException, toData
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addIndex, flush, getLocalMapStats
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAll
destroy, getName, getPartitionKey, getServiceName
protected static final String NULL_KEY_IS_NOT_ALLOWED
protected static final String NULL_VALUE_IS_NOT_ALLOWED
protected static final String NULL_PREDICATE_IS_NOT_ALLOWED
protected static final String NULL_LISTENER_IS_NOT_ALLOWED
protected static final String NULL_AGGREGATOR_IS_NOT_ALLOWED
protected static final String NULL_PROJECTION_IS_NOT_ALLOWED
protected final String name
protected final LocalMapStatsImpl localMapStats
protected final LockProxySupport lockSupport
protected final PartitioningStrategy partitionStrategy
protected final MapServiceContext mapServiceContext
protected final IPartitionService partitionService
protected final Address thisAddress
protected final OperationService operationService
protected final SerializationService serializationService
protected final boolean statisticsEnabled
protected final MapConfig mapConfig
protected final String localMemberUuid
protected MapOperationProvider operationProvider
public NearCachedMapProxyImpl(String name, MapService mapService, NodeEngine nodeEngine, MapConfig mapConfig)
public void initialize()
initialize
in interface InitializingObject
protected InternalCompletableFuture<Data> getAsyncInternal(Data key)
protected boolean tryPutInternal(Data key, Data value, long timeout, TimeUnit timeunit)
protected Data putIfAbsentInternal(Data key, Data value, long ttl, TimeUnit timeunit)
protected void putTransientInternal(Data key, Data value, long ttl, TimeUnit timeunit)
protected InternalCompletableFuture<Data> putAsyncInternal(Data key, Data value, long ttl, TimeUnit timeunit)
protected InternalCompletableFuture<Data> setAsyncInternal(Data key, Data value, long ttl, TimeUnit timeunit)
protected boolean evictInternal(Data key)
key
- the key to evicttrue
if eviction was successful, false
otherwiseprotected void evictAllInternal()
public void clearInternal()
public void loadAllInternal(boolean replaceExistingValues)
protected void loadInternal(Iterable<Data> keys, boolean replaceExistingValues)
protected void removeAllInternal(Predicate predicate)
protected void deleteInternal(Data key)
protected InternalCompletableFuture<Data> removeAsyncInternal(Data key)
protected boolean containsKeyInternal(Data keyData)
protected void getAllObjectInternal(List<Data> keys, List<Object> resultingKeyValuePairs)
protected void invokePutAllOperationFactory(Address address, long size, int[] partitions, MapEntries[] entries) throws Exception
Exception
public Data executeOnKeyInternal(Data key, EntryProcessor entryProcessor)
public Map executeOnKeysInternal(Set<Data> keys, EntryProcessor entryProcessor)
public InternalCompletableFuture<Object> executeOnKeyInternal(Data key, EntryProcessor entryProcessor, ExecutionCallback<Object> callback)
public void executeOnEntriesInternal(EntryProcessor entryProcessor, Predicate predicate, List<Data> resultingKeyValuePairs)
protected boolean preDestroy()
preDestroy
in class AbstractDistributedObject<MapService>
protected void invalidateCache(Data key)
protected void invalidateCache(Collection<Data> keys)
protected boolean isOwn(Data key)
public void waitUntilLoaded()
public int size()
public boolean containsValueInternal(Data dataValue)
public boolean isEmpty()
protected void putAllInternal(Map<?,?> map)
PutAllPartitionAwareOperationFactory
per member.
If there are e.g. five keys for a single member, there will only be a single remote invocation
instead of having five remote invocations.
There is also an optional support for batching to send smaller packages.
Takes care about null
checks for keys and values.public void flush()
public String addMapInterceptorInternal(MapInterceptor interceptor)
public void removeMapInterceptorInternal(String id)
public String addLocalEntryListenerInternal(Object listener, Predicate predicate, Data key, boolean includeValue)
protected String addEntryListenerInternal(Object listener, Data key, boolean includeValue)
protected String addEntryListenerInternal(Object listener, Predicate predicate, Data key, boolean includeValue)
protected boolean removeEntryListenerInternal(String id)
protected String addPartitionLostListenerInternal(MapPartitionLostListener listener)
protected boolean removePartitionLostListenerInternal(String id)
protected <T> T toObject(Object object)
protected Data toData(Object object, PartitioningStrategy partitioningStrategy)
public void addIndex(String attribute, boolean ordered)
public LocalMapStats getLocalMapStats()
protected long getTimeInMillis(long time, TimeUnit timeunit)
protected MapQueryEngine getMapQueryEngine()
protected boolean isMapStoreEnabled()
protected MapConfig getMapConfig()
public final String getName()
DistributedObject
DistributedObjectUtil.getName(DistributedObject)
because this might be also a PrefixedDistributedObject
.getName
in interface DistributedObject
public final String getServiceName()
DistributedObject
getServiceName
in interface DistributedObject
getServiceName
in class AbstractDistributedObject<MapService>
public PartitioningStrategy getPartitionStrategy()
public void setOperationProvider(MapOperationProvider operationProvider)
public MapOperationProvider getOperationProvider()
public int getTotalBackupCount()
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.