Record Class MicrometerTimerTracker
java.lang.Object
java.lang.Record
org.infinispan.commons.stat.micrometer.MicrometerTimerTracker
- All Implemented Interfaces:
TimerTracker
public record MicrometerTimerTracker(io.micrometer.core.instrument.Timer timer)
extends Record
implements TimerTracker
A
TimerTracker implementation that stores the value in Timer.- Since:
- 15.1
-
Field Summary
Fields inherited from interface org.infinispan.commons.stat.TimerTracker
NO_OP -
Constructor Summary
ConstructorsConstructorDescriptionMicrometerTimerTracker(io.micrometer.core.instrument.Timer timer) Creates an instance of aMicrometerTimerTrackerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongcount()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.io.micrometer.core.instrument.Timertimer()Returns the value of thetimerrecord component.final StringtoString()Returns a string representation of this record class.voidAdds a record.voidAdds a record.
-
Constructor Details
-
MicrometerTimerTracker
public MicrometerTimerTracker(io.micrometer.core.instrument.Timer timer) Creates an instance of aMicrometerTimerTrackerrecord class.- Parameters:
timer- the value for thetimerrecord component
-
-
Method Details
-
update
Description copied from interface:TimerTrackerAdds a record.- Specified by:
updatein interfaceTimerTracker- Parameters:
duration- The duration value.
-
update
Description copied from interface:TimerTrackerAdds a record.- Specified by:
updatein interfaceTimerTracker- Parameters:
value- The value.timeUnit- TheTimeUnitof the value.
-
count
public long count()- Specified by:
countin interfaceTimerTracker- Returns:
- The amount of records.
-
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 withObjects::equals(Object,Object). -
timer
public io.micrometer.core.instrument.Timer timer()Returns the value of thetimerrecord component.- Returns:
- the value of the
timerrecord component
-