public class DefaultMetricsProvider extends Object implements MetricsProvider
MetricsProvider.| Constructor and Description |
|---|
DefaultMetricsProvider() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(Properties configuration)
Configure the provider.
|
void |
dump(BiConsumer<String,Object> sink)
Dumps all metrics as a key-value pair.
|
MetricsContext |
getRootContext()
Provides access to the root context.
|
void |
resetAllValues()
Reset all values.
|
void |
start()
Start the provider.
|
void |
stop()
Releases resources held by the provider.
This method must not throw exceptions. This method can be called more than once. |
public void configure(Properties configuration) throws MetricsProviderLifeCycleException
MetricsProviderconfigure in interface MetricsProviderconfiguration - the configuration.MetricsProviderLifeCycleException - in case of invalid configuration.public void start()
throws MetricsProviderLifeCycleException
MetricsProviderstart in interface MetricsProviderMetricsProviderLifeCycleException - in case of failurepublic MetricsContext getRootContext()
MetricsProvidergetRootContext in interface MetricsProviderpublic void stop()
MetricsProviderstop in interface MetricsProviderpublic void dump(BiConsumer<String,Object> sink)
MetricsProviderdump in interface MetricsProvidersink - the receiver of all of the current values.public void resetAllValues()
MetricsProviderresetAllValues in interface MetricsProviderCopyright © 2008–2021 The Apache Software Foundation. All rights reserved.