public final class MetricRepository extends Object implements Serializable
Metric instances by their
label.| Modifier and Type | Method and Description |
|---|---|
static Metric |
get(String inLabel)
Gets a
Metric with a specified label. |
Set<String> |
getLabels()
Gets the labels for all metrics in the repository.
|
Metric |
getMetric(String inLabel)
Gets a
Metric with a specified label. |
static MetricRepository |
instance()
Returns the singleton instance of
MetricRepository. |
static void |
put(Metric inMetric)
Places an instance of
Metric into the repository. |
void |
putMetric(Metric inMetric)
Places an instance of
Metric into the repository. |
public static MetricRepository instance()
MetricRepository.public Set<String> getLabels()
public Metric getMetric(String inLabel)
Metric with a specified label.inLabel - String labelMetric with the specified label, or nullpublic void putMetric(Metric inMetric)
Metric into the repository.
If the repository already contains a Metric with the same
label, it is replaced with the specified one.inMetric - Metric to be placed into the repository.public static Metric get(String inLabel)
Metric with a specified label.
This static method is equivalent to
MetricRepository.instance().getMetric(label)inLabel - String labelMetric with the specified label, or nullpublic static void put(Metric inMetric)
Metric into the repository.
This static method is equivalent to
MetricRepository.instance().putMetric(metric)inMetric - Metric to be placed into the repositoryCopyright © 2015. All rights reserved.