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
MetricsProvider
configure
in interface MetricsProvider
configuration
- the configuration.MetricsProviderLifeCycleException
- in case of invalid configuration.public void start() throws MetricsProviderLifeCycleException
MetricsProvider
start
in interface MetricsProvider
MetricsProviderLifeCycleException
- in case of failurepublic MetricsContext getRootContext()
MetricsProvider
getRootContext
in interface MetricsProvider
public void stop()
MetricsProvider
stop
in interface MetricsProvider
public void dump(BiConsumer<String,Object> sink)
MetricsProvider
dump
in interface MetricsProvider
sink
- the receiver of all of the current values.public void resetAllValues()
MetricsProvider
resetAllValues
in interface MetricsProvider
Copyright © 2008–2023 The Apache Software Foundation. All rights reserved.