Record Class OperationsTracker.OperationRecord
java.lang.Object
java.lang.Record
com.loomcache.server.metrics.OperationsTracker.OperationRecord
- Enclosing class:
OperationsTracker
public static record OperationsTracker.OperationRecord(OperationsTracker.OperationType type, String dataStructure, long latencyNs, long timestamp, boolean success)
extends Record
Operation record.
-
Constructor Summary
ConstructorsConstructorDescriptionOperationRecord(OperationsTracker.OperationType type, String dataStructure, long latencyNs, long timestamp, boolean success) Creates an instance of aOperationRecordrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedataStructurerecord 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 thelatencyNsrecord component.booleansuccess()Returns the value of thesuccessrecord component.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
OperationRecord
public OperationRecord(OperationsTracker.OperationType type, String dataStructure, long latencyNs, long timestamp, boolean success) Creates an instance of aOperationRecordrecord class.- Parameters:
type- the value for thetyperecord componentdataStructure- the value for thedataStructurerecord componentlatencyNs- the value for thelatencyNsrecord componenttimestamp- the value for thetimestamprecord componentsuccess- the value for thesuccessrecord component
-
-
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. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
dataStructure
Returns the value of thedataStructurerecord component.- Returns:
- the value of the
dataStructurerecord component
-
latencyNs
public long latencyNs()Returns the value of thelatencyNsrecord component.- Returns:
- the value of the
latencyNsrecord component
-
timestamp
public long timestamp()Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
success
public boolean success()Returns the value of thesuccessrecord component.- Returns:
- the value of the
successrecord component
-