public class CacheMergeOperation extends CacheOperation implements BackupAwareOperation
SplitBrainMergePolicy
.cacheService, dontCreateCacheRecordStoreIfNotExist, recordStore, tenantContext, wanEventPublisher
name
GENERIC_PARTITION_ID
Constructor and Description |
---|
CacheMergeOperation() |
CacheMergeOperation(String name,
List<SplitBrainMergeTypes.CacheMergeTypes> mergingEntries,
SplitBrainMergePolicy<Data,SplitBrainMergeTypes.CacheMergeTypes> mergePolicy) |
Modifier and Type | Method and Description |
---|---|
protected void |
beforeRunInternal()
Implementers can override this method to make a specific execution.
|
Operation |
getBackupOperation()
Creates the
BackupOperation responsible for making the backup. |
int |
getClassId()
Returns type identifier for this class.
|
Object |
getResponse()
Called if and only if
Operation.returnsResponse() returned true ,
shortly after Operation.run() returns. |
protected void |
readInternal(ObjectDataInput in) |
void |
run()
Runs the operation.
|
boolean |
shouldBackup()
Checks if a backup needs to be made.
|
protected void |
writeInternal(ObjectDataOutput out) |
afterRun, beforeRun, dispose, getAsyncBackupCount, getFactoryId, getServiceName, getServiceNamespace, getSyncBackupCount, logError, onInvocationException, publishWanRemove, publishWanUpdate, publishWanUpdate, publishWanUpdate
getName, toString
call, executedLocally, getCallerAddress, getCallerUuid, getCallId, getCallTimeout, getClientCallId, getConnection, getInvocationTime, getLogger, getNodeEngine, getOperationResponseHandler, getPartitionId, getReplicaIndex, getService, getWaitTimeout, isUrgent, onExecutionFailure, 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
getAsyncBackupCount, getSyncBackupCount
getPartitionId
readData, writeData
public CacheMergeOperation()
public CacheMergeOperation(String name, List<SplitBrainMergeTypes.CacheMergeTypes> mergingEntries, SplitBrainMergePolicy<Data,SplitBrainMergeTypes.CacheMergeTypes> mergePolicy)
protected void beforeRunInternal()
CacheOperation
beforeRunInternal
in class CacheOperation
public 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()
public Object getResponse()
Operation
Operation.returnsResponse()
returned true
,
shortly after Operation.run()
returns.getResponse
in class Operation
public boolean shouldBackup()
BackupAwareOperation
If a call has not made any change, e.g. an AtomicLong increment with 0, no backup needs to be made.
shouldBackup
in interface BackupAwareOperation
public Operation getBackupOperation()
BackupAwareOperation
BackupOperation
responsible for making the backup.getBackupOperation
in interface BackupAwareOperation
BackupOperation
responsible for making the backup.protected void writeInternal(ObjectDataOutput out) throws IOException
writeInternal
in class AbstractNamedOperation
IOException
protected void readInternal(ObjectDataInput in) throws IOException
readInternal
in class AbstractNamedOperation
IOException
public int getClassId()
IdentifiedDataSerializable
getClassId
in interface IdentifiedDataSerializable
Copyright © 2019 Hazelcast, Inc.. All rights reserved.