Package org.apache.bookkeeper.stats
Interface StatsProvider
- All Known Implementing Classes:
CachingStatsProvider,CodahaleMetricsProvider,FastCodahaleMetricsProvider,NullStatsProvider,OtelMetricsProvider,PrometheusMetricsProvider
public interface StatsProvider
Provider to provide stats logger for different scopes.
-
Method Summary
Modifier and TypeMethodDescriptiongetStatsLogger(String scope) Return the stats logger to a given scope.default StringgetStatsName(String... statsComponents) Return the fully qualified stats name comprised of given statsComponents.voidstart(org.apache.commons.configuration2.Configuration conf) Initialize the stats provider by loading the given configuration conf.voidstop()Close the stats provider.default voidwriteAllMetrics(Writer writer)
-
Method Details
-
start
void start(org.apache.commons.configuration2.Configuration conf) Initialize the stats provider by loading the given configuration conf.- Parameters:
conf- Configuration to configure the stats provider.
-
stop
void stop()Close the stats provider. -
writeAllMetrics
- Parameters:
writer-- Throws:
IOException
-
getStatsLogger
Return the stats logger to a given scope.- Parameters:
scope- Scope for the given stats- Returns:
- stats logger for the given scope
-
getStatsName
Return the fully qualified stats name comprised of given statsComponents.- Parameters:
statsComponents- stats components to comprise the fully qualified stats name- Returns:
- the fully qualified stats name
-