Record Class StatisticsEvent
java.lang.Object
java.lang.Record
org.j7m.middleware.metrics.StatisticsEvent
- Record Components:
key- event keytimestampMillis- event timestamplatencyNanos- event latencysuccess- whether the event succeedederrorCode- failure code when unsuccessful
-
Constructor Summary
ConstructorsConstructorDescriptionStatisticsEvent(String key, long timestampMillis, long latencyNanos, boolean success, org.j7m.middleware.api.MiddlewareErrorCode errorCode) Creates a statistics event. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.org.j7m.middleware.api.MiddlewareErrorCodeReturns the value of theerrorCoderecord component.final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.longReturns the value of thelatencyNanosrecord component.booleansuccess()Returns the value of thesuccessrecord component.longReturns the value of thetimestampMillisrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
StatisticsEvent
public StatisticsEvent(String key, long timestampMillis, long latencyNanos, boolean success, org.j7m.middleware.api.MiddlewareErrorCode errorCode) Creates a statistics event.
-
-
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. -
key
-
timestampMillis
public long timestampMillis()Returns the value of thetimestampMillisrecord component.- Returns:
- the value of the
timestampMillisrecord component
-
latencyNanos
public long latencyNanos()Returns the value of thelatencyNanosrecord component.- Returns:
- the value of the
latencyNanosrecord component
-
success
-
errorCode
-