public interface IMetricManager
| 限定符和类型 | 方法和说明 |
|---|---|
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
|
Meter getMeter(String group, MetricName name)
Meter metric in given group, and name.
if not exist, an instance will be created.group - the group of MetricRegistryname - the name of the metricCounter getCounter(String group, MetricName name)
Counter metric in given group, and name.
if not exist, an instance will be created.group - the group of MetricRegistryname - the name of the metricHistogram getHistogram(String group, MetricName name)
Histogram metric in given group, and name.
if not exist, an instance will be created.group - the group of MetricRegistryname - the name of the metricHistogram getHistogram(String group, MetricName name, ReservoirType type)
Histogram metric in given group, name, and type
if not exist, an instance will be created.group - the group of MetricRegistryname - the name of the metrictype - the type of the reservoirTimer getTimer(String group, MetricName name)
Timer metric in given group, and name.
if not exist, an instance will be created.group - the group of MetricRegistryname - the name of the metricTimer getTimer(String group, MetricName name, ReservoirType type)
Timer metric in given group, name, and type
if not exist, an instance will be created.group - the group of MetricRegistryname - the name of the metrictype - the type of the reservoirCompass getCompass(String group, MetricName name)
Compass metric in given group, and name.
if not exist, an instance will be created.group - the group of MetricRegistryname - the name of the metricCompass getCompass(String group, MetricName name, ReservoirType type)
Compass metric in given group, name, and type
if not exist, an instance will be created.group - the group of MetricRegistryname - the name of the metrictype - the type of the reservoirFastCompass getFastCompass(String group, MetricName name)
FastCompass metric in give group, name, and type
if not exist, an instance will be created.group - the group of MetricRegistryname - the name of the metricFastCompassClusterHistogram getClusterHistogram(String group, MetricName name, long[] buckets)
ClusterHistogram metric in give group, name, and type
if not exist, an instance will be created.group - the group of MetricRegistryname - the name of the metricbuckets - if the buckets is null, a default bucket will be created.ClusterHistogramvoid register(String group, MetricName name, Metric metric)
group: - the group name of MetricRegistrymetric - the metric to registerList<String> listMetricGroups()
boolean isEnabled()
void setEnabled(boolean enabled)
Map<String,Set<MetricName>> listMetricNamesByGroup()
MetricRegistry getMetricRegistryByGroup(String group)
group - the group name to querySortedMap<MetricName,Gauge> getGauges(String group, MetricFilter filter)
SortedMap<MetricName,Counter> getCounters(String group, MetricFilter filter)
SortedMap<MetricName,Histogram> getHistograms(String group, MetricFilter filter)
SortedMap<MetricName,Meter> getMeters(String group, MetricFilter filter)
SortedMap<MetricName,Timer> getTimers(String group, MetricFilter filter)
SortedMap<MetricName,Compass> getCompasses(String group, MetricFilter filter)
SortedMap<MetricName,FastCompass> getFastCompasses(String group, MetricFilter filter)
Map<MetricName,Metric> getMetrics(String group)
Map<Class<? extends Metric>,Map<MetricName,? extends Metric>> getCategoryMetrics(String group)
group - Map<Class<? extends Metric>,Map<MetricName,? extends Metric>> getCategoryMetrics(String group, MetricFilter filter)
group - filter - Map<Class<? extends Metric>,Map<MetricName,? extends Metric>> getAllCategoryMetrics(MetricFilter filter)
filter - void clear()
Copyright © 2019. All rights reserved.