Class SimpleTimerTracker

java.lang.Object
org.infinispan.commons.stat.SimpleTimerTracker
All Implemented Interfaces:
TimerTracker

public class SimpleTimerTracker extends Object implements TimerTracker
A simple implementation of TimerTracker that keep tracks of events and the sum of their duration.
Since:
15.1
  • Constructor Details

    • SimpleTimerTracker

      public SimpleTimerTracker()
  • Method Details

    • update

      public void update(Duration duration)
      Description copied from interface: TimerTracker
      Adds a record.
      Specified by:
      update in interface TimerTracker
      Parameters:
      duration - The duration value.
    • update

      public void update(long value, TimeUnit timeUnit)
      Description copied from interface: TimerTracker
      Adds a record.
      Specified by:
      update in interface TimerTracker
      Parameters:
      value - The value.
      timeUnit - The TimeUnit of the value.
    • count

      public long count()
      Specified by:
      count in interface TimerTracker
      Returns:
      The amount of records.
    • totalTime

      public double totalTime()