Record Class AppendEntriesResponse
java.lang.Object
java.lang.Record
org.j7m.middleware.api.consensus.AppendEntriesResponse
- Record Components:
groupId- group idterm- responder termnodeId- responder idsuccess- whether append validation succeededmatchIndex- highest matching indexreason- safe reason code
- All Implemented Interfaces:
Serializable
public record AppendEntriesResponse(ConsensusGroupId groupId, ConsensusTerm term, ConsensusNodeId nodeId, boolean success, LogIndex matchIndex, String reason)
extends Record
implements Serializable
Raft-like AppendEntries response.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAppendEntriesResponse(ConsensusGroupId groupId, ConsensusTerm term, ConsensusNodeId nodeId, boolean success, LogIndex matchIndex, String reason) Creates a response. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.groupId()Returns the value of thegroupIdrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thematchIndexrecord component.nodeId()Returns the value of thenodeIdrecord component.reason()Returns the value of thereasonrecord component.booleansuccess()Returns the value of thesuccessrecord component.term()Returns the value of thetermrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AppendEntriesResponse
public AppendEntriesResponse(ConsensusGroupId groupId, ConsensusTerm term, ConsensusNodeId nodeId, boolean success, LogIndex matchIndex, String reason) Creates a response.
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
groupId
-
term
-
nodeId
-
success
-
matchIndex
Returns the value of thematchIndexrecord component.- Returns:
- the value of the
matchIndexrecord component
-
reason
-