Class CodahaleMetricsProvider
- java.lang.Object
 - 
- org.apache.bookkeeper.stats.codahale.CodahaleMetricsProvider
 
 
- 
- All Implemented Interfaces:
 StatsProvider
- Direct Known Subclasses:
 FastCodahaleMetricsProvider
public class CodahaleMetricsProvider extends java.lang.Object implements StatsProvider
AStatsProviderimplemented based on Codahale metrics library. 
- 
- 
Field Summary
Fields Modifier and Type Field Description (package private) com.codahale.metrics.jmx.JmxReporterjmx(package private) static org.slf4j.LoggerLOG(package private) com.codahale.metrics.MetricRegistrymetrics(package private) java.util.List<com.codahale.metrics.ScheduledReporter>reporters 
- 
Constructor Summary
Constructors Constructor Description CodahaleMetricsProvider() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.codahale.metrics.MetricRegistrygetMetrics()StatsLoggergetStatsLogger(java.lang.String name)Return the stats logger to a given scope.java.lang.StringgetStatsName(java.lang.String... statsComponents)Return the fully qualified stats name comprised of given statsComponents.(package private) voidinitIfNecessary()voidstart(org.apache.commons.configuration2.Configuration conf)Initialize the stats provider by loading the given configuration conf.voidstop()Close the stats provider.- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface org.apache.bookkeeper.stats.StatsProvider
writeAllMetrics 
 - 
 
 - 
 
- 
- 
Method Detail
- 
initIfNecessary
void initIfNecessary()
 
- 
getMetrics
public com.codahale.metrics.MetricRegistry getMetrics()
 
- 
start
public void start(org.apache.commons.configuration2.Configuration conf)
Description copied from interface:StatsProviderInitialize the stats provider by loading the given configuration conf.- Specified by:
 startin interfaceStatsProvider- Parameters:
 conf- Configuration to configure the stats provider.
 
- 
stop
public void stop()
Description copied from interface:StatsProviderClose the stats provider.- Specified by:
 stopin interfaceStatsProvider
 
- 
getStatsLogger
public StatsLogger getStatsLogger(java.lang.String name)
Description copied from interface:StatsProviderReturn the stats logger to a given scope.- Specified by:
 getStatsLoggerin interfaceStatsProvider- 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:StatsProviderReturn the fully qualified stats name comprised of given statsComponents.- Specified by:
 getStatsNamein interfaceStatsProvider- Parameters:
 statsComponents- stats components to comprise the fully qualified stats name- Returns:
 - the fully qualified stats name
 
 
 - 
 
 -