Record Class ObjectInvocationStats
java.lang.Object
java.lang.Record
org.j7m.middleware.ha.ObjectInvocationStats
- Record Components:
invocationCount- invocation countfailureCount- failure countaverageLatencyNanos- average latencyloadScore- load score where lower is better
public record ObjectInvocationStats(long invocationCount, long failureCount, long averageLatencyNanos, double loadScore)
extends Record
Immutable per-object invocation statistics.
-
Constructor Summary
ConstructorsConstructorDescriptionObjectInvocationStats(long invocationCount, long failureCount, long averageLatencyNanos, double loadScore) Creates an instance of aObjectInvocationStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theaverageLatencyNanosrecord 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.longReturns the value of theinvocationCountrecord component.doubleReturns the value of theloadScorerecord component.doubleReturns the success rate.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ObjectInvocationStats
public ObjectInvocationStats(long invocationCount, long failureCount, long averageLatencyNanos, double loadScore) Creates an instance of aObjectInvocationStatsrecord class.- Parameters:
invocationCount- the value for theinvocationCountrecord componentfailureCount- the value for thefailureCountrecord componentaverageLatencyNanos- the value for theaverageLatencyNanosrecord componentloadScore- the value for theloadScorerecord component
-
-
Method Details
-
successRate
public double successRate()Returns the success rate.- Returns:
- success rate in
0.0..1.0
-
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. -
invocationCount
public long invocationCount()Returns the value of theinvocationCountrecord component.- Returns:
- the value of the
invocationCountrecord 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
-
loadScore
-