public class MetricRegistry extends Object
Constructor and Description |
---|
MetricRegistry(String name)
Creates a new
MetricRegistry . |
Modifier and Type | Method and Description |
---|---|
Map<MetricTags,MetricGroup> |
getGroups() |
String |
getName() |
Map<String,Object> |
getSnapshotByPrefixAndMatchingTags(String prefix,
MetricTags tags) |
Map<String,Object> |
getSnapshotsByPrefix(String prefix) |
boolean |
isEmpty() |
void |
register(String name,
MetricTags tags,
Metric metric)
Given a
Gauge , registers it under the given name. |
void |
remove(String metricName,
MetricTags tags) |
void |
removeByPrefix(String prefix,
MetricTags tags) |
MetricRegistrySnapshot |
snapshot(long timestamp) |
public MetricRegistry(String name)
MetricRegistry
.public String getName()
public Map<MetricTags,MetricGroup> getGroups()
public void register(String name, MetricTags tags, Metric metric)
Gauge
, registers it under the given name.name
- the name of the metricmetric
- the metricIllegalArgumentException
- if the name is already registeredpublic void remove(String metricName, MetricTags tags)
public void removeByPrefix(String prefix, MetricTags tags)
public Map<String,Object> getSnapshotByPrefixAndMatchingTags(String prefix, MetricTags tags)
prefix
- - prefixes of the wanted metricstags
- - the tags that need to be matchedpublic boolean isEmpty()
public MetricRegistrySnapshot snapshot(long timestamp)
Copyright © GigaSpaces.