Class Slf4jSink

  • All Implemented Interfaces:
    Sink

    @ThreadSafe
    public class Slf4jSink
    extends java.lang.Object
    implements Sink
    A sink which outputs metric values to the metrics logger.
    • Constructor Summary

      Constructors 
      Constructor Description
      Slf4jSink​(java.util.Properties properties, com.codahale.metrics.MetricRegistry registry)
      Creates a new Slf4jSink 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

      • Slf4jSink

        public Slf4jSink​(java.util.Properties properties,
                         com.codahale.metrics.MetricRegistry registry)
                  throws java.lang.Exception
        Creates a new Slf4jSink with a Properties and MetricRegistry.
        Parameters:
        properties - the properties
        registry - the metric registry to register
        Throws:
        java.lang.Exception
    • 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