Package it.unitn.disi.ds1.qtop
Record Class Utils.VoteResponse
java.lang.Object
java.lang.Record
it.unitn.disi.ds1.qtop.Utils.VoteResponse
- Record Components:
vote- the vote of the nodeepoch- the epoch associated to the vote
- All Implemented Interfaces:
Serializable
- Enclosing class:
Utils
public static record Utils.VoteResponse(Utils.Vote vote, Utils.EpochPair epoch)
extends Record
implements Serializable
Message to send the vote of a node to the coordinator.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionVoteResponse(Utils.Vote vote, Utils.EpochPair epoch) Creates an instance of aVoteResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionepoch()Returns the value of theepochrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.vote()Returns the value of thevoterecord component.
-
Constructor Details
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
vote
Returns the value of thevoterecord component.- Returns:
- the value of the
voterecord component
-
epoch
Returns the value of theepochrecord component.- Returns:
- the value of the
epochrecord component
-