Record Class ConsensusMessage.VoteResponse
java.lang.Object
java.lang.Record
org.j7m.middleware.consensus.ConsensusMessage.VoteResponse
- Record Components:
from- senderto- receiverresponse- vote response
- All Implemented Interfaces:
ConsensusMessage
- Enclosing interface:
ConsensusMessage
public static record ConsensusMessage.VoteResponse(org.j7m.middleware.api.consensus.ConsensusNodeId from, org.j7m.middleware.api.consensus.ConsensusNodeId to, org.j7m.middleware.api.consensus.RequestVoteResponse response)
extends Record
implements ConsensusMessage
Vote response message.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ConsensusMessage
ConsensusMessage.AppendRequest, ConsensusMessage.AppendResponse, ConsensusMessage.VoteRequest, ConsensusMessage.VoteResponse -
Constructor Summary
ConstructorsConstructorDescriptionVoteResponse(org.j7m.middleware.api.consensus.ConsensusNodeId from, org.j7m.middleware.api.consensus.ConsensusNodeId to, org.j7m.middleware.api.consensus.RequestVoteResponse response) Creates an instance of aVoteResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.org.j7m.middleware.api.consensus.ConsensusNodeIdfrom()Returns the value of thefromrecord component.final inthashCode()Returns a hash code value for this object.org.j7m.middleware.api.consensus.RequestVoteResponseresponse()Returns the value of theresponserecord component.org.j7m.middleware.api.consensus.ConsensusNodeIdto()Returns the value of thetorecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
VoteResponse
public VoteResponse(org.j7m.middleware.api.consensus.ConsensusNodeId from, org.j7m.middleware.api.consensus.ConsensusNodeId to, org.j7m.middleware.api.consensus.RequestVoteResponse response) Creates an instance of aVoteResponserecord class.
-
-
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). -
from
public org.j7m.middleware.api.consensus.ConsensusNodeId from()Returns the value of thefromrecord component.- Specified by:
fromin interfaceConsensusMessage- Returns:
- the value of the
fromrecord component
-
to
public org.j7m.middleware.api.consensus.ConsensusNodeId to()Returns the value of thetorecord component.- Specified by:
toin interfaceConsensusMessage- Returns:
- the value of the
torecord component
-
response
-