public class NOPMetricManager extends Object implements IMetricManager
| Constructor and Description |
|---|
NOPMetricManager() |
| Modifier and Type | Method and Description |
|---|---|
BucketCounter |
getBucketCounter(String group,
MetricName name)
Create a
BucketCounter metric in given group, and name. |
Compass |
getCompass(String group,
MetricName name)
Create a
Compass metric in give group, name, and type
if not exist, an instance will be created. |
Map<MetricName,Compass> |
getCompasses(String group,
MetricFilter filter)
Get all the compasses by the specific group and filter
|
Counter |
getCounter(String group,
MetricName name)
Create a
Counter metric in given group, and name. |
Map<MetricName,Counter> |
getCounters(String group,
MetricFilter filter)
Get all the counters by the specific group and filter
|
MetricRegistry |
getMetricRegistryByGroup(String group)
Get metric registry by group name,
if not found, null will be returned
|
Map<MetricName,Metric> |
getMetrics(String group)
A map of metric names to metrics.
|
List<String> |
listMetricGroups()
Get a list of group in current MetricManager
|
Map<String,Set<MetricName>> |
listMetricNamesByGroup()
list all metric names by group
|
void |
register(String group,
MetricName name,
Metric metric)
Register a customized metric to specified group.
|
public Counter getCounter(String group, MetricName name)
IMetricManagerCounter metric in given group, and name.
if not exist, an instance will be created.getCounter in interface IMetricManagergroup - the group of MetricRegistryname - the name of the metricpublic BucketCounter getBucketCounter(String group, MetricName name)
IMetricManagerBucketCounter metric in given group, and name.
if not exist, an instance will be created.getBucketCounter in interface IMetricManagergroup - the group of MetricRegistryname - the name of the metricBucketCounterpublic Compass getCompass(String group, MetricName name)
IMetricManagerCompass metric in give group, name, and type
if not exist, an instance will be created.getCompass in interface IMetricManagergroup - the group of MetricRegistryname - the name of the metricCompasspublic List<String> listMetricGroups()
IMetricManagerlistMetricGroups in interface IMetricManagerpublic Map<String,Set<MetricName>> listMetricNamesByGroup()
IMetricManagerlistMetricNamesByGroup in interface IMetricManagerpublic MetricRegistry getMetricRegistryByGroup(String group)
IMetricManagergetMetricRegistryByGroup in interface IMetricManagergroup - the group name to querypublic Map<MetricName,Counter> getCounters(String group, MetricFilter filter)
IMetricManagergetCounters in interface IMetricManagergroup - the given groupfilter - the given filterpublic Map<MetricName,Compass> getCompasses(String group, MetricFilter filter)
IMetricManagergetCompasses in interface IMetricManagergroup - the given groupfilter - the given filterpublic void register(String group, MetricName name, Metric metric)
IMetricManagerregister in interface IMetricManagermetric - the metric to registerpublic Map<MetricName,Metric> getMetrics(String group)
IMetricManagergetMetrics in interface IMetricManagerCopyright © 2011–2019 The Apache Software Foundation. All rights reserved.