Class GraphiteSink

  • All Implemented Interfaces:
    Sink

    @ThreadSafe
    public class GraphiteSink
    extends java.lang.Object
    implements Sink
    A sink which publishes metric values to a Graphite server.
    • Constructor Summary

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

      • GraphiteSink

        public GraphiteSink​(java.util.Properties properties,
                            com.codahale.metrics.MetricRegistry registry)
                     throws java.lang.IllegalArgumentException
        Creates a new GraphiteSink with a Properties and MetricRegistry.
        Parameters:
        properties - the properties which may contain polling period and unit properties
        registry - the metric registry to register
        Throws:
        java.lang.IllegalArgumentException - if the host or port property is missing
    • 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