public class NullMetricsProvider extends Object implements MetricsProvider
| Modifier and Type | Class and Description |
|---|---|
static class |
NullMetricsProvider.NullMetricsContext |
| Modifier and Type | Field and Description |
|---|---|
static MetricsProvider |
INSTANCE
Instance of NullMetricsProvider useful for tests.
|
| Constructor and Description |
|---|
NullMetricsProvider() |
| 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 static final MetricsProvider INSTANCE
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 dump(BiConsumer<String,Object> sink)
MetricsProviderdump in interface MetricsProvidersink - the receiver of all of the current values.public void resetAllValues()
MetricsProviderresetAllValues in interface MetricsProviderpublic void stop()
MetricsProviderstop in interface MetricsProviderCopyright © 2008–2021 The Apache Software Foundation. All rights reserved.