Record Class LockMetrics.Snapshot
java.lang.Object
java.lang.Record
org.ek9lang.core.LockMetrics.Snapshot
- Enclosing class:
LockMetrics
public static record LockMetrics.Snapshot(long acquisitions, long waitNanos, long holdNanos)
extends Record
One reading of the counters.
-
Constructor Summary
ConstructorsConstructorDescriptionSnapshot(long acquisitions, long waitNanos, long holdNanos) Creates an instance of aSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theacquisitionsrecord 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 theholdNanosrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thewaitNanosrecord component.
-
Constructor Details
-
Snapshot
public Snapshot(long acquisitions, long waitNanos, long holdNanos) Creates an instance of aSnapshotrecord class.- Parameters:
acquisitions- the value for theacquisitionsrecord componentwaitNanos- the value for thewaitNanosrecord componentholdNanos- the value for theholdNanosrecord 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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
acquisitions
public long acquisitions()Returns the value of theacquisitionsrecord component.- Returns:
- the value of the
acquisitionsrecord component
-
waitNanos
public long waitNanos()Returns the value of thewaitNanosrecord component.- Returns:
- the value of the
waitNanosrecord component
-
holdNanos
public long holdNanos()Returns the value of theholdNanosrecord component.- Returns:
- the value of the
holdNanosrecord component
-