public class DefaultRaftReplicateOp extends RaftReplicateOp implements IndeterminateOperationStateAware
RaftInvocationManager
to replicate a given
RaftOp
to leader of the target Raft group. The leader sends
the response for this operation after it commits the given operation
to the majority of the Raft group.GENERIC_PARTITION_ID
Constructor and Description |
---|
DefaultRaftReplicateOp() |
DefaultRaftReplicateOp(CPGroupId groupId,
RaftOp op) |
Modifier and Type | Method and Description |
---|---|
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
int |
getId()
Returns type identifier for this class.
|
boolean |
isRetryableOnIndeterminateOperationState()
Returns true if duplicate commit of the operation is equivalent to
committing it only once.
|
protected void |
readInternal(ObjectDataInput in) |
protected ICompletableFuture |
replicate(RaftNode raftNode) |
protected void |
toString(StringBuilder sb)
A template method allows for additional information to be passed into
the
Operation.toString() method. |
protected void |
writeInternal(ObjectDataOutput out) |
getServiceName, onFailure, onResponse, returnsResponse, run, validatesTarget
afterRun, beforeRun, call, executedLocally, getCallerAddress, getCallerUuid, getCallId, getCallTimeout, getConnection, getInvocationTime, getLogger, getNodeEngine, getOperationResponseHandler, getPartitionId, getReplicaIndex, getResponse, getService, getWaitTimeout, isUrgent, logError, onExecutionFailure, onInvocationException, onSetCallId, readData, requiresExplicitServiceName, sendResponse, setCallerUuid, setNodeEngine, setOperationResponseHandler, setPartitionId, setReplicaIndex, setService, setServiceName, setValidateTarget, setWaitTimeout, toString, writeData
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
readData, writeData
protected ICompletableFuture replicate(RaftNode raftNode)
replicate
in class RaftReplicateOp
public boolean isRetryableOnIndeterminateOperationState()
IndeterminateOperationStateAware
isRetryableOnIndeterminateOperationState
in interface IndeterminateOperationStateAware
public int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getId()
IdentifiedDataSerializable
getId
in interface IdentifiedDataSerializable
protected void writeInternal(ObjectDataOutput out) throws IOException
writeInternal
in class RaftReplicateOp
IOException
protected void readInternal(ObjectDataInput in) throws IOException
readInternal
in class RaftReplicateOp
IOException
protected void toString(StringBuilder sb)
Operation
Operation.toString()
method. So an Operation subclass can override
this method and add additional debugging content. The default
implementation does nothing so one is not forced to provide an empty
implementation.
It is a good practice to always call the super.toString(stringBuffer)
when implementing this method to make sure that the super class can
inject content if needed.toString
in class RaftReplicateOp
sb
- the StringBuilder to add the debug info to.Copyright © 2020 Hazelcast, Inc.. All Rights Reserved.