public abstract class MapOperation extends AbstractNamedOperation implements IdentifiedDataSerializable, ServiceNamespaceAware
Modifier and Type | Field and Description |
---|---|
protected boolean |
createRecordStoreOnDemand |
protected boolean |
disposeDeferredBlocks |
protected MapContainer |
mapContainer |
protected MapEventPublisher |
mapEventPublisher |
protected MapService |
mapService |
protected MapServiceContext |
mapServiceContext |
protected RecordStore |
recordStore |
name
GENERIC_PARTITION_ID
Constructor and Description |
---|
MapOperation() |
MapOperation(String name) |
Modifier and Type | Method and Description |
---|---|
void |
afterRun()
Is executed called after
Operation.run() or Operation.call() method completes normally and the operation is not
blocked, see CallStatus.WAIT . |
protected void |
afterRunInternal() |
void |
beforeRun()
The beforeRun is called before either the
Operation.run() or the Operation.call() method is called. |
protected boolean |
disableWanReplicationEvent() |
protected void |
evict(Data justAddedKey) |
protected CallerProvenance |
getCallerProvenance() |
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
String |
getServiceName() |
ObjectNamespace |
getServiceNamespace()
Returns the
ServiceNamespace which this object belongs to. |
long |
getThreadId() |
protected void |
innerBeforeRun() |
protected void |
invalidateAllKeysInNearCaches()
This method helps to add clearing Near Cache event only from
one-partition which matches partitionId of the map name.
|
void |
invalidateNearCache(Data key) |
protected void |
invalidateNearCache(List<Data> keys) |
boolean |
isPostProcessing(RecordStore recordStore) |
void |
logError(Throwable e)
Logs
Exception /Error thrown during operation execution. |
void |
onExecutionFailure(Throwable e)
Called when an
Exception /Error is thrown during
operation execution. |
protected void |
publishLoadAsWanUpdate(Data dataKey,
Object value) |
protected void |
publishWanRemove(Data dataKey) |
protected void |
publishWanUpdate(Data dataKey,
Object value) |
void |
run()
Runs the operation.
|
protected void |
runInternal() |
void |
setMapContainer(MapContainer mapContainer) |
void |
setMapService(MapService mapService) |
void |
setThreadId(long threadId) |
protected TxnReservedCapacityCounter |
wbqCapacityCounter() |
getName, readInternal, toString, writeInternal
call, executedLocally, getCallerAddress, getCallerUuid, getCallId, getCallTimeout, getClientCallId, getConnection, getInvocationTime, getLogger, getNodeEngine, getOperationResponseHandler, getPartitionId, getReplicaIndex, getResponse, getService, getWaitTimeout, isUrgent, onInvocationException, onSetCallId, readData, requiresExplicitServiceName, returnsResponse, sendResponse, setCallerUuid, setClientCallId, setNodeEngine, setOperationResponseHandler, setPartitionId, setReplicaIndex, setService, setServiceName, setValidateTarget, setWaitTimeout, toString, validatesTarget, writeData
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getClassId
readData, writeData
protected transient MapService mapService
protected transient RecordStore recordStore
protected transient MapContainer mapContainer
protected transient MapServiceContext mapServiceContext
protected transient MapEventPublisher mapEventPublisher
protected transient boolean createRecordStoreOnDemand
protected transient boolean disposeDeferredBlocks
public MapOperation()
public MapOperation(String name)
public final void beforeRun() throws Exception
Operation
Operation.run()
or the Operation.call()
method is called.
runs before wait-supportpublic final void run()
Operation
Operation.run()
or Operation.call()
method should be implemented; not both.
Runs after wait-support, supposed to do actual operationrun
in class Operation
Operation.call()
protected void runInternal()
public final void afterRun() throws Exception
Operation
Operation.run()
or Operation.call()
method completes normally and the operation is not
blocked, see CallStatus.WAIT
.
Runs after backups, before wait-notify.protected void afterRunInternal()
protected final CallerProvenance getCallerProvenance()
public void onExecutionFailure(Throwable e)
Operation
Exception
/Error
is thrown during
operation execution.
By default this method does nothing. Operation implementations can override this behaviour according to their needs.
This method is called on node & thread that's executing the operation.
onExecutionFailure
in class Operation
e
- Exception/Error thrown during operation executionpublic void logError(Throwable e)
Operation
Exception
/Error
thrown during operation execution.
Operation implementations can override this behaviour according to their needs.
This method is called on node & thread that's executing the operation.
public String getServiceName()
getServiceName
in class Operation
public boolean isPostProcessing(RecordStore recordStore)
public void setThreadId(long threadId)
public long getThreadId()
public final void invalidateNearCache(Data key)
protected final void invalidateAllKeysInNearCaches()
protected final void evict(Data justAddedKey)
public int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public ObjectNamespace getServiceNamespace()
ServiceNamespaceAware
ServiceNamespace
which this object belongs to.getServiceNamespace
in interface ServiceNamespaceAware
public void setMapService(MapService mapService)
public void setMapContainer(MapContainer mapContainer)
protected final void publishWanRemove(Data dataKey)
protected boolean disableWanReplicationEvent()
protected final TxnReservedCapacityCounter wbqCapacityCounter()
Copyright © 2019 Hazelcast, Inc.. All rights reserved.