Record Class StatisticsSnapshot
java.lang.Object
java.lang.Record
org.j7m.middleware.metrics.StatisticsSnapshot
- Record Components:
totalCount- total event countsuccessCount- successful event countfailureCount- failed event countaverageLatencyNanos- average latencyretainedEventCount- retained event countcounters- named counters
-
Constructor Summary
ConstructorsConstructorDescriptionStatisticsSnapshot(long totalCount, long successCount, long failureCount, long averageLatencyNanos, int retainedEventCount, Map<String, Long> counters) Creates immutable counters. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theaverageLatencyNanosrecord component.counters()Returns the value of thecountersrecord component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of thefailureCountrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of theretainedEventCountrecord component.longReturns the value of thesuccessCountrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalCountrecord component.
-
Constructor Details
-
StatisticsSnapshot
-
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
totalCount
public long totalCount()Returns the value of thetotalCountrecord component.- Returns:
- the value of the
totalCountrecord component
-
successCount
public long successCount()Returns the value of thesuccessCountrecord component.- Returns:
- the value of the
successCountrecord component
-
failureCount
public long failureCount()Returns the value of thefailureCountrecord component.- Returns:
- the value of the
failureCountrecord component
-
averageLatencyNanos
public long averageLatencyNanos()Returns the value of theaverageLatencyNanosrecord component.- Returns:
- the value of the
averageLatencyNanosrecord component
-
retainedEventCount
public int retainedEventCount()Returns the value of theretainedEventCountrecord component.- Returns:
- the value of the
retainedEventCountrecord component
-
counters
-