Class ConsoleSink

  • All Implemented Interfaces:
    Sink

    @ThreadSafe
    public final class ConsoleSink
    extends java.lang.Object
    implements Sink
    A sink which outputs metric values to the console.
    • Constructor Summary

      Constructors 
      Constructor Description
      ConsoleSink​(java.util.Properties properties, com.codahale.metrics.MetricRegistry registry)
      Creates a new ConsoleSink with a Properties and MetricRegistry.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void report()
      Reports the current values of all metrics.
      void start()
      Starts the reporter polling.
      void stop()
      Stops the reporter.
      • Methods inherited from class java.lang.Object

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

      • ConsoleSink

        public ConsoleSink​(java.util.Properties properties,
                           com.codahale.metrics.MetricRegistry registry)
        Creates a new ConsoleSink with a Properties and MetricRegistry.
        Parameters:
        properties - the properties which may contain polling period and unit properties
        registry - the metric registry to register
    • Method Detail

      • start

        public void start()
        Description copied from interface: Sink
        Starts the reporter polling.
        Specified by:
        start in interface Sink
      • stop

        public void stop()
        Description copied from interface: Sink
        Stops the reporter.
        Specified by:
        stop in interface Sink
      • report

        public void report()
        Description copied from interface: Sink
        Reports the current values of all metrics.
        Specified by:
        report in interface Sink