Record Class RequestVoteRequest
java.lang.Object
java.lang.Record
org.j7m.middleware.api.consensus.RequestVoteRequest
- Record Components:
groupId- group idterm- candidate termcandidateId- candidate idlastLogIndex- candidate last log indexlastLogTerm- candidate last log term
- All Implemented Interfaces:
Serializable
public record RequestVoteRequest(ConsensusGroupId groupId, ConsensusTerm term, ConsensusNodeId candidateId, LogIndex lastLogIndex, ConsensusTerm lastLogTerm)
extends Record
implements Serializable
Raft-like RequestVote request.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRequestVoteRequest(ConsensusGroupId groupId, ConsensusTerm term, ConsensusNodeId candidateId, LogIndex lastLogIndex, ConsensusTerm lastLogTerm) Creates a vote request. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecandidateIdrecord 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 thelastLogIndexrecord component.Returns the value of thelastLogTermrecord component.term()Returns the value of thetermrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RequestVoteRequest
public RequestVoteRequest(ConsensusGroupId groupId, ConsensusTerm term, ConsensusNodeId candidateId, LogIndex lastLogIndex, ConsensusTerm lastLogTerm) Creates a vote 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
-
candidateId
Returns the value of thecandidateIdrecord component.- Returns:
- the value of the
candidateIdrecord component
-
lastLogIndex
Returns the value of thelastLogIndexrecord component.- Returns:
- the value of the
lastLogIndexrecord component
-
lastLogTerm
Returns the value of thelastLogTermrecord component.- Returns:
- the value of the
lastLogTermrecord component
-