Class JvmSource

  • All Implemented Interfaces:
    Source

    @ThreadSafe
    public class JvmSource
    extends java.lang.Object
    implements Source
    A Source which collects JVM metrics, including JVM memory usage, GC counts, GC times, etc.
    • Constructor Summary

      Constructors 
      Constructor Description
      JvmSource()
      Creates a new JvmSource and register all JVM metrics.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.codahale.metrics.MetricRegistry getMetricRegistry()
      Gets the instance of the MetricRegistry.
      java.lang.String getName()
      Gets the name of the Source.
      • Methods inherited from class java.lang.Object

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

      • JvmSource

        public JvmSource()
        Creates a new JvmSource and register all JVM metrics.
    • Method Detail

      • getName

        public java.lang.String getName()
        Description copied from interface: Source
        Gets the name of the Source.
        Specified by:
        getName in interface Source
        Returns:
        the name of the Source
      • getMetricRegistry

        public com.codahale.metrics.MetricRegistry getMetricRegistry()
        Description copied from interface: Source
        Gets the instance of the MetricRegistry. A MetricRegistry is used to register the metrics, and is passed to a Sink so that the sink knows which metrics to report.
        Specified by:
        getMetricRegistry in interface Source
        Returns:
        the instance of the MetricRegistry