@ThreadSafe public class MetricsStore extends Object
Constructor and Description |
---|
MetricsStore() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears all the metrics.
|
Set<Metric> |
getMetricsByInstanceTypeAndName(MetricsSystem.InstanceType instanceType,
String name)
Gets all the metrics by instance type and the metric name.
|
void |
putClientMetrics(String hostname,
String clientId,
List<Metric> metrics)
Put the metrics from a client with a hostname and a client id.
|
void |
putWorkerMetrics(String hostname,
List<Metric> metrics)
Put the metrics from a worker with a hostname.
|
public void putWorkerMetrics(String hostname, List<Metric> metrics)
hostname
- the hostname of the instancemetrics
- the new worker metricspublic void putClientMetrics(String hostname, String clientId, List<Metric> metrics)
hostname
- the hostname of the clientclientId
- the id of the clientmetrics
- the new metricspublic Set<Metric> getMetricsByInstanceTypeAndName(MetricsSystem.InstanceType instanceType, String name)
instanceType
- the instance typename
- the metric namepublic void clear()
DefaultMetricsMaster
and before starting the metrics updater to avoid conflicts with
other methods in this class which updates or accesses
the metrics inside metrics sets.Copyright © 2023. All Rights Reserved.