Record Class ConsensusMetricsSnapshot

java.lang.Object
java.lang.Record
org.j7m.middleware.api.consensus.ConsensusMetricsSnapshot
Record Components:
elections - elections started
leadersElected - leaders elected
appendRequests - append requests processed
appendRejections - append rejections
voteRequests - vote requests processed
voteRejections - vote rejections
commandsCommitted - committed commands
recoveries - recovery count
invariantFailures - invariant failure count
All Implemented Interfaces:
Serializable

public record ConsensusMetricsSnapshot(long elections, long leadersElected, long appendRequests, long appendRejections, long voteRequests, long voteRejections, long commandsCommitted, long recoveries, long invariantFailures) extends Record implements Serializable
Safe consensus metrics snapshot.
See Also:
  • Constructor Details

    • ConsensusMetricsSnapshot

      public ConsensusMetricsSnapshot(long elections, long leadersElected, long appendRequests, long appendRejections, long voteRequests, long voteRejections, long commandsCommitted, long recoveries, long invariantFailures)
      Creates metrics.
  • 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 the compare method from their corresponding wrapper classes.
      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.
    • elections

      public long elections()
      Returns the value of the elections record component.
      Returns:
      the value of the elections record component
    • leadersElected

      public long leadersElected()
      Returns the value of the leadersElected record component.
      Returns:
      the value of the leadersElected record component
    • appendRequests

      public long appendRequests()
      Returns the value of the appendRequests record component.
      Returns:
      the value of the appendRequests record component
    • appendRejections

      public long appendRejections()
      Returns the value of the appendRejections record component.
      Returns:
      the value of the appendRejections record component
    • voteRequests

      public long voteRequests()
      Returns the value of the voteRequests record component.
      Returns:
      the value of the voteRequests record component
    • voteRejections

      public long voteRejections()
      Returns the value of the voteRejections record component.
      Returns:
      the value of the voteRejections record component
    • commandsCommitted

      public long commandsCommitted()
      Returns the value of the commandsCommitted record component.
      Returns:
      the value of the commandsCommitted record component
    • recoveries

      public long recoveries()
      Returns the value of the recoveries record component.
      Returns:
      the value of the recoveries record component
    • invariantFailures

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