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

    Constructors
    Constructor
    Description
    ClusterStatus(int selfId, int leaderId, int role, int peerCount, long commitIndex, long applyIndex, long currentTerm, long proxyForwards, long quorumTimeouts)
    Creates an instance of a ClusterStatus record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Returns the value of the applyIndex record component.
    long
    Returns the value of the commitIndex record component.
    long
    Returns the value of the currentTerm record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the leaderId record component.
    int
    Returns the value of the peerCount record component.
    long
    Returns the value of the proxyForwards record component.
    long
    Returns the value of the quorumTimeouts record component.
    int
    Returns the value of the role record component.
    int
    Returns the value of the selfId record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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 a ClusterStatus record class.
      Parameters:
      selfId - the value for the selfId record component
      leaderId - the value for the leaderId record component
      role - the value for the role record component
      peerCount - the value for the peerCount record component
      commitIndex - the value for the commitIndex record component
      applyIndex - the value for the applyIndex record component
      currentTerm - the value for the currentTerm record component
      proxyForwards - the value for the proxyForwards record component
      quorumTimeouts - the value for the quorumTimeouts record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • selfId

      public int selfId()
      Returns the value of the selfId record component.
      Returns:
      the value of the selfId record component
    • leaderId

      public int leaderId()
      Returns the value of the leaderId record component.
      Returns:
      the value of the leaderId record component
    • role

      public int role()
      Returns the value of the role record component.
      Returns:
      the value of the role record component
    • peerCount

      public int peerCount()
      Returns the value of the peerCount record component.
      Returns:
      the value of the peerCount record component
    • commitIndex

      public long commitIndex()
      Returns the value of the commitIndex record component.
      Returns:
      the value of the commitIndex record component
    • applyIndex

      public long applyIndex()
      Returns the value of the applyIndex record component.
      Returns:
      the value of the applyIndex record component
    • currentTerm

      public long currentTerm()
      Returns the value of the currentTerm record component.
      Returns:
      the value of the currentTerm record component
    • proxyForwards

      public long proxyForwards()
      Returns the value of the proxyForwards record component.
      Returns:
      the value of the proxyForwards record component
    • quorumTimeouts

      public long quorumTimeouts()
      Returns the value of the quorumTimeouts record component.
      Returns:
      the value of the quorumTimeouts record component