Package com.tuladb
Record Class Models.ClusterStatus
java.lang.Object
java.lang.Record
com.tuladb.Models.ClusterStatus
- Enclosing class:
Models
public static record Models.ClusterStatus(int selfId, int leaderId, int role, int peerCount, long commitIndex, long applyIndex, long currentTerm, long proxyForwards, long quorumTimeouts)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionClusterStatus(int selfId, int leaderId, int role, int peerCount, long commitIndex, long applyIndex, long currentTerm, long proxyForwards, long quorumTimeouts) Creates an instance of aClusterStatusrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theapplyIndexrecord component.longReturns the value of thecommitIndexrecord component.longReturns the value of thecurrentTermrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intleaderId()Returns the value of theleaderIdrecord component.intReturns the value of thepeerCountrecord component.longReturns the value of theproxyForwardsrecord component.longReturns the value of thequorumTimeoutsrecord component.introle()Returns the value of therolerecord component.intselfId()Returns the value of theselfIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ClusterStatus
public ClusterStatus(int selfId, int leaderId, int role, int peerCount, long commitIndex, long applyIndex, long currentTerm, long proxyForwards, long quorumTimeouts) Creates an instance of aClusterStatusrecord class.- Parameters:
selfId- the value for theselfIdrecord componentleaderId- the value for theleaderIdrecord componentrole- the value for therolerecord componentpeerCount- the value for thepeerCountrecord componentcommitIndex- the value for thecommitIndexrecord componentapplyIndex- the value for theapplyIndexrecord componentcurrentTerm- the value for thecurrentTermrecord componentproxyForwards- the value for theproxyForwardsrecord componentquorumTimeouts- the value for thequorumTimeoutsrecord component
-
-
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 with '=='. -
selfId
public int selfId()Returns the value of theselfIdrecord component.- Returns:
- the value of the
selfIdrecord component
-
leaderId
public int leaderId()Returns the value of theleaderIdrecord component.- Returns:
- the value of the
leaderIdrecord component
-
role
public int role()Returns the value of therolerecord component.- Returns:
- the value of the
rolerecord component
-
peerCount
public int peerCount()Returns the value of thepeerCountrecord component.- Returns:
- the value of the
peerCountrecord component
-
commitIndex
public long commitIndex()Returns the value of thecommitIndexrecord component.- Returns:
- the value of the
commitIndexrecord component
-
applyIndex
public long applyIndex()Returns the value of theapplyIndexrecord component.- Returns:
- the value of the
applyIndexrecord component
-
currentTerm
public long currentTerm()Returns the value of thecurrentTermrecord component.- Returns:
- the value of the
currentTermrecord component
-
proxyForwards
public long proxyForwards()Returns the value of theproxyForwardsrecord component.- Returns:
- the value of the
proxyForwardsrecord component
-
quorumTimeouts
public long quorumTimeouts()Returns the value of thequorumTimeoutsrecord component.- Returns:
- the value of the
quorumTimeoutsrecord component
-