Record Class ConsensusMetricsSnapshot
java.lang.Object
java.lang.Record
org.j7m.middleware.api.consensus.ConsensusMetricsSnapshot
- Record Components:
elections- elections startedleadersElected- leaders electedappendRequests- append requests processedappendRejections- append rejectionsvoteRequests- vote requests processedvoteRejections- vote rejectionscommandsCommitted- committed commandsrecoveries- recovery countinvariantFailures- 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 Summary
ConstructorsConstructorDescriptionConsensusMetricsSnapshot(long elections, long leadersElected, long appendRequests, long appendRejections, long voteRequests, long voteRejections, long commandsCommitted, long recoveries, long invariantFailures) Creates metrics. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theappendRejectionsrecord component.longReturns the value of theappendRequestsrecord component.longReturns the value of thecommandsCommittedrecord component.longReturns the value of theelectionsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of theinvariantFailuresrecord component.longReturns the value of theleadersElectedrecord component.longReturns the value of therecoveriesrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thevoteRejectionsrecord component.longReturns the value of thevoteRequestsrecord component.
-
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
-
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 with thecomparemethod from their corresponding wrapper classes. -
elections
-
leadersElected
public long leadersElected()Returns the value of theleadersElectedrecord component.- Returns:
- the value of the
leadersElectedrecord component
-
appendRequests
public long appendRequests()Returns the value of theappendRequestsrecord component.- Returns:
- the value of the
appendRequestsrecord component
-
appendRejections
public long appendRejections()Returns the value of theappendRejectionsrecord component.- Returns:
- the value of the
appendRejectionsrecord component
-
voteRequests
public long voteRequests()Returns the value of thevoteRequestsrecord component.- Returns:
- the value of the
voteRequestsrecord component
-
voteRejections
public long voteRejections()Returns the value of thevoteRejectionsrecord component.- Returns:
- the value of the
voteRejectionsrecord component
-
commandsCommitted
public long commandsCommitted()Returns the value of thecommandsCommittedrecord component.- Returns:
- the value of the
commandsCommittedrecord component
-
recoveries
public long recoveries()Returns the value of therecoveriesrecord component.- Returns:
- the value of the
recoveriesrecord component
-
invariantFailures
public long invariantFailures()Returns the value of theinvariantFailuresrecord component.- Returns:
- the value of the
invariantFailuresrecord component
-