Class MetricsSystem.MultiTimerContext

  • All Implemented Interfaces:
    java.lang.AutoCloseable
    Enclosing class:
    MetricsSystem

    public static class MetricsSystem.MultiTimerContext
    extends java.lang.Object
    implements java.lang.AutoCloseable
    A timer context with multiple timers.
    • Constructor Summary

      Constructors 
      Constructor Description
      MultiTimerContext​(com.codahale.metrics.Timer... timers)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Updates the timer with the difference between current and start time.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MultiTimerContext

        public MultiTimerContext​(com.codahale.metrics.Timer... timers)
        Parameters:
        timers - timers associated with this context
    • Method Detail

      • close

        public void close()
        Updates the timer with the difference between current and start time. Call to this method will not reset the start time. Multiple calls result in multiple updates.
        Specified by:
        close in interface java.lang.AutoCloseable