Interface Ticker

All Superinterfaces:
AutoCloseable

@Internal public interface Ticker extends AutoCloseable
An object used to profile and/or monitor of a code block, that can be used to mark the end of the code block. Ticker extends AutoCloseable to allow for try-with-resources style usage:
     try (Ticker ignored = Timers.start("my-timer")) {
         // monitored code block here
     }
 
or
     try (Ticker ignored = Metrics.start("my-metric")) {
         // monitored code block here
     }
 
Since:
3.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Ticker
    Simple no-op Ticker implementation
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
  • Field Details

    • NO_OP

      static final Ticker NO_OP
      Simple no-op Ticker implementation
  • Method Details