public class NOPMetricManager extends Object implements IMetricManager
| 构造器和说明 |
|---|
NOPMetricManager() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear()
清空IMetricManager
|
Map<Class<? extends Metric>,Map<MetricName,? extends Metric>> |
getAllCategoryMetrics(MetricFilter filter)
return all metrics
|
Map<Class<? extends Metric>,Map<MetricName,? extends Metric>> |
getCategoryMetrics(String group)
返回不同Metric分类,各自保存好的map
|
Map<Class<? extends Metric>,Map<MetricName,? extends Metric>> |
getCategoryMetrics(String group,
MetricFilter filter)
返回不同Metric分类,各自保存好的map
|
ClusterHistogram |
getClusterHistogram(String group,
MetricName name,
long[] buckets)
Create a
ClusterHistogram metric in give group, name, and type
if not exist, an instance will be created. |
Compass |
getCompass(String group,
MetricName name)
Create a
Compass metric in given group, and name. |
Compass |
getCompass(String group,
MetricName name,
ReservoirType type)
Create a
Compass metric in given group, name, and type
if not exist, an instance will be created. |
SortedMap<MetricName,Compass> |
getCompasses(String group,
MetricFilter filter) |
Counter |
getCounter(String group,
MetricName name)
Create a
Counter metric in given group, and name. |
SortedMap<MetricName,Counter> |
getCounters(String group,
MetricFilter filter) |
FastCompass |
getFastCompass(String group,
MetricName name)
Create a
FastCompass metric in give group, name, and type
if not exist, an instance will be created. |
SortedMap<MetricName,FastCompass> |
getFastCompasses(String group,
MetricFilter filter) |
SortedMap<MetricName,Gauge> |
getGauges(String group,
MetricFilter filter) |
Histogram |
getHistogram(String group,
MetricName name)
Create a
Histogram metric in given group, and name. |
Histogram |
getHistogram(String group,
MetricName name,
ReservoirType type)
Create a
Histogram metric in given group, name, and type
if not exist, an instance will be created. |
SortedMap<MetricName,Histogram> |
getHistograms(String group,
MetricFilter filter) |
Meter |
getMeter(String group,
MetricName name)
Create a
Meter metric in given group, and name. |
SortedMap<MetricName,Meter> |
getMeters(String group,
MetricFilter 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.
|
Timer |
getTimer(String group,
MetricName name)
Create a
Timer metric in given group, and name. |
Timer |
getTimer(String group,
MetricName name,
ReservoirType type)
Create a
Timer metric in given group, name, and type
if not exist, an instance will be created. |
SortedMap<MetricName,Timer> |
getTimers(String group,
MetricFilter filter) |
boolean |
isEnabled()
A global flag to complete disable the metrics feature
|
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.
|
void |
setEnabled(boolean enabled)
A global flag to complete disable the metrics feature
|
public Meter getMeter(String group, MetricName name)
IMetricManagerMeter metric in given group, and name.
if not exist, an instance will be created.getMeter 在接口中 IMetricManagergroup - the group of MetricRegistryname - the name of the metricpublic Counter getCounter(String group, MetricName name)
IMetricManagerCounter metric in given group, and name.
if not exist, an instance will be created.getCounter 在接口中 IMetricManagergroup - the group of MetricRegistryname - the name of the metricpublic Histogram getHistogram(String group, MetricName name)
IMetricManagerHistogram metric in given group, and name.
if not exist, an instance will be created.getHistogram 在接口中 IMetricManagergroup - the group of MetricRegistryname - the name of the metricpublic Histogram getHistogram(String group, MetricName name, ReservoirType type)
IMetricManagerHistogram metric in given group, name, and type
if not exist, an instance will be created.getHistogram 在接口中 IMetricManagergroup - the group of MetricRegistryname - the name of the metrictype - the type of the reservoirpublic Timer getTimer(String group, MetricName name)
IMetricManagerTimer metric in given group, and name.
if not exist, an instance will be created.getTimer 在接口中 IMetricManagergroup - the group of MetricRegistryname - the name of the metricpublic Timer getTimer(String group, MetricName name, ReservoirType type)
IMetricManagerTimer metric in given group, name, and type
if not exist, an instance will be created.getTimer 在接口中 IMetricManagergroup - the group of MetricRegistryname - the name of the metrictype - the type of the reservoirpublic Compass getCompass(String group, MetricName name, ReservoirType type)
IMetricManagerCompass metric in given group, name, and type
if not exist, an instance will be created.getCompass 在接口中 IMetricManagergroup - the group of MetricRegistryname - the name of the metrictype - the type of the reservoirpublic Compass getCompass(String group, MetricName name)
IMetricManagerCompass metric in given group, and name.
if not exist, an instance will be created.getCompass 在接口中 IMetricManagergroup - the group of MetricRegistryname - the name of the metricpublic FastCompass getFastCompass(String group, MetricName name)
IMetricManagerFastCompass metric in give group, name, and type
if not exist, an instance will be created.getFastCompass 在接口中 IMetricManagergroup - the group of MetricRegistryname - the name of the metricFastCompasspublic ClusterHistogram getClusterHistogram(String group, MetricName name, long[] buckets)
IMetricManagerClusterHistogram metric in give group, name, and type
if not exist, an instance will be created.getClusterHistogram 在接口中 IMetricManagergroup - the group of MetricRegistryname - the name of the metricbuckets - if the buckets is null, a default bucket will be created.ClusterHistogrampublic List<String> listMetricGroups()
IMetricManagerlistMetricGroups 在接口中 IMetricManagerpublic boolean isEnabled()
IMetricManagerisEnabled 在接口中 IMetricManagerpublic void setEnabled(boolean enabled)
IMetricManagersetEnabled 在接口中 IMetricManagerpublic Map<String,Set<MetricName>> listMetricNamesByGroup()
IMetricManagerlistMetricNamesByGroup 在接口中 IMetricManagerpublic MetricRegistry getMetricRegistryByGroup(String group)
IMetricManagergetMetricRegistryByGroup 在接口中 IMetricManagergroup - the group name to querypublic SortedMap<MetricName,Gauge> getGauges(String group, MetricFilter filter)
getGauges 在接口中 IMetricManagerpublic SortedMap<MetricName,Counter> getCounters(String group, MetricFilter filter)
getCounters 在接口中 IMetricManagerpublic SortedMap<MetricName,Histogram> getHistograms(String group, MetricFilter filter)
getHistograms 在接口中 IMetricManagerpublic SortedMap<MetricName,Meter> getMeters(String group, MetricFilter filter)
getMeters 在接口中 IMetricManagerpublic SortedMap<MetricName,Timer> getTimers(String group, MetricFilter filter)
getTimers 在接口中 IMetricManagerpublic SortedMap<MetricName,Compass> getCompasses(String group, MetricFilter filter)
getCompasses 在接口中 IMetricManagerpublic SortedMap<MetricName,FastCompass> getFastCompasses(String group, MetricFilter filter)
getFastCompasses 在接口中 IMetricManagerpublic void register(String group, MetricName name, Metric metric)
IMetricManagerregister 在接口中 IMetricManagermetric - the metric to registerpublic Map<MetricName,Metric> getMetrics(String group)
IMetricManagergetMetrics 在接口中 IMetricManagerpublic Map<Class<? extends Metric>,Map<MetricName,? extends Metric>> getCategoryMetrics(String group)
IMetricManagergetCategoryMetrics 在接口中 IMetricManagerpublic Map<Class<? extends Metric>,Map<MetricName,? extends Metric>> getCategoryMetrics(String group, MetricFilter filter)
IMetricManagergetCategoryMetrics 在接口中 IMetricManagerpublic void clear()
IMetricManagerclear 在接口中 IMetricManagerpublic Map<Class<? extends Metric>,Map<MetricName,? extends Metric>> getAllCategoryMetrics(MetricFilter filter)
IMetricManagergetAllCategoryMetrics 在接口中 IMetricManagerCopyright © 2019. All rights reserved.