Class CodahaleMetricsProvider

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) com.codahale.metrics.jmx.JmxReporter jmx  
      (package private) static org.slf4j.Logger LOG  
      (package private) com.codahale.metrics.MetricRegistry metrics  
      (package private) java.util.List<com.codahale.metrics.ScheduledReporter> reporters  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.codahale.metrics.MetricRegistry getMetrics()  
      StatsLogger getStatsLogger​(java.lang.String name)
      Return the stats logger to a given scope.
      java.lang.String getStatsName​(java.lang.String... statsComponents)
      Return the fully qualified stats name comprised of given statsComponents.
      (package private) void initIfNecessary()  
      void start​(org.apache.commons.configuration.Configuration conf)
      Initialize the stats provider by loading the given configuration conf.
      void stop()
      Close the stats provider.
      • Methods inherited from class java.lang.Object

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

      • LOG

        static final org.slf4j.Logger LOG
      • metrics

        com.codahale.metrics.MetricRegistry metrics
      • reporters

        java.util.List<com.codahale.metrics.ScheduledReporter> reporters
      • jmx

        com.codahale.metrics.jmx.JmxReporter jmx
    • Constructor Detail

      • CodahaleMetricsProvider

        public CodahaleMetricsProvider()
    • Method Detail

      • initIfNecessary

        void initIfNecessary()
      • getMetrics

        public com.codahale.metrics.MetricRegistry getMetrics()
      • start

        public void start​(org.apache.commons.configuration.Configuration conf)
        Description copied from interface: StatsProvider
        Initialize the stats provider by loading the given configuration conf.
        Specified by:
        start in interface StatsProvider
        Parameters:
        conf - Configuration to configure the stats provider.
      • stop

        public void stop()
        Description copied from interface: StatsProvider
        Close the stats provider.
        Specified by:
        stop in interface StatsProvider
      • getStatsLogger

        public StatsLogger getStatsLogger​(java.lang.String name)
        Description copied from interface: StatsProvider
        Return the stats logger to a given scope.
        Specified by:
        getStatsLogger in interface StatsProvider
        Parameters:
        name - Scope for the given stats
        Returns:
        stats logger for the given scope
      • getStatsName

        public java.lang.String getStatsName​(java.lang.String... statsComponents)
        Description copied from interface: StatsProvider
        Return the fully qualified stats name comprised of given statsComponents.
        Specified by:
        getStatsName in interface StatsProvider
        Parameters:
        statsComponents - stats components to comprise the fully qualified stats name
        Returns:
        the fully qualified stats name