Record Class AppendEntriesRequest
java.lang.Object
java.lang.Record
org.j7m.middleware.api.consensus.AppendEntriesRequest
- Record Components:
groupId- group idterm- leader termleaderId- leader idprevLogIndex- previous log indexprevLogTerm- previous log termentries- entries to appendleaderCommit- leader commit index
- All Implemented Interfaces:
Serializable
public record AppendEntriesRequest(ConsensusGroupId groupId, ConsensusTerm term, ConsensusNodeId leaderId, LogIndex prevLogIndex, ConsensusTerm prevLogTerm, List<ConsensusLogEntry> entries, CommitIndex leaderCommit)
extends Record
implements Serializable
Raft-like AppendEntries request.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAppendEntriesRequest(ConsensusGroupId groupId, ConsensusTerm term, ConsensusNodeId leaderId, LogIndex prevLogIndex, ConsensusTerm prevLogTerm, List<ConsensusLogEntry> entries, CommitIndex leaderCommit) Creates an AppendEntries request. -
Method Summary
Modifier and TypeMethodDescriptionentries()Returns the value of theentriesrecord component.final 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 theleaderCommitrecord component.leaderId()Returns the value of theleaderIdrecord component.Returns the value of theprevLogIndexrecord component.Returns the value of theprevLogTermrecord component.term()Returns the value of thetermrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AppendEntriesRequest
public AppendEntriesRequest(ConsensusGroupId groupId, ConsensusTerm term, ConsensusNodeId leaderId, LogIndex prevLogIndex, ConsensusTerm prevLogTerm, List<ConsensusLogEntry> entries, CommitIndex leaderCommit) Creates an AppendEntries request.
-
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
groupId
-
term
-
leaderId
-
prevLogIndex
Returns the value of theprevLogIndexrecord component.- Returns:
- the value of the
prevLogIndexrecord component
-
prevLogTerm
Returns the value of theprevLogTermrecord component.- Returns:
- the value of the
prevLogTermrecord component
-
entries
-
leaderCommit
Returns the value of theleaderCommitrecord component.- Returns:
- the value of the
leaderCommitrecord component
-