public abstract class MetricRegistries extends Object
| 构造器和说明 |
|---|
MetricRegistries() |
| 限定符和类型 | 方法和说明 |
|---|---|
abstract void |
addReporterRegistration(Consumer<RatisMetricRegistry> reporterRegistration,
Consumer<RatisMetricRegistry> stopReporter)
Add hook to register reporter for the metricRegistry.
|
abstract void |
clear()
Removes all the MetricRegisties.
|
abstract RatisMetricRegistry |
create(MetricRegistryInfo info)
Create or return MetricRegistry with the given info.
|
abstract void |
enableConsoleReporter(TimeDuration consoleReportRate)
Enable console reporter for the metricRegistry.
|
abstract void |
enableJmxReporter()
Enable jmx reporter for the metricRegistry.
|
abstract Optional<RatisMetricRegistry> |
get(MetricRegistryInfo info)
Returns the MetricRegistry if found.
|
abstract Collection<RatisMetricRegistry> |
getMetricRegistries()
Returns MetricRegistry's created.
|
abstract Set<MetricRegistryInfo> |
getMetricRegistryInfos()
Returns MetricRegistryInfo's for the MetricRegistry's created.
|
static MetricRegistries |
global()
Return the global singleton instance for the MetricRegistries.
|
abstract boolean |
remove(MetricRegistryInfo key)
Decrements the ref count of the MetricRegistry, and removes if ref count == 0.
|
void |
removeReporterRegistration(Consumer<RatisMetricRegistry> reporterRegistration,
Consumer<RatisMetricRegistry> stopReporter)
Remove hook of reporter for the metricRegistry.
|
public static MetricRegistries global()
public abstract void clear()
public abstract RatisMetricRegistry create(MetricRegistryInfo info)
info - the info object for the MetricRegistrytry.public abstract boolean remove(MetricRegistryInfo key)
key - the info object for the MetricRegistrytry.public abstract Optional<RatisMetricRegistry> get(MetricRegistryInfo info)
info - the info for the registry.public abstract Set<MetricRegistryInfo> getMetricRegistryInfos()
public abstract Collection<RatisMetricRegistry> getMetricRegistries()
public abstract void addReporterRegistration(Consumer<RatisMetricRegistry> reporterRegistration, Consumer<RatisMetricRegistry> stopReporter)
reporterRegistration - Consumer to create the reporter for the registry.stopReporter - Consumer to stop the reporter for the registry.public void removeReporterRegistration(Consumer<RatisMetricRegistry> reporterRegistration, Consumer<RatisMetricRegistry> stopReporter)
reporterRegistration - Consumer to create the reporter for the registry.stopReporter - Consumer to stop the reporter for the registry.public abstract void enableJmxReporter()
public abstract void enableConsoleReporter(TimeDuration consoleReportRate)
consoleReportRate - Console report rate.Copyright © 2017–2024 The Apache Software Foundation. All rights reserved.