@ThreadSafe public class MetricsStore extends Object
Modifier and Type | Class and Description |
---|---|
static class |
MetricsStore.ClusterCounterKey
The key for cluster counter map.
|
Constructor and Description |
---|
MetricsStore(java.time.Clock clock)
Constructs a new
MetricsStore . |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears all the metrics.
|
long |
getLastClearTime() |
void |
initMetricKeys()
Inits the metrics store.
|
void |
putClientMetrics(String source,
List<Metric> metrics)
Put the metrics from a client with a source name.
|
void |
putWorkerMetrics(String source,
List<Metric> metrics)
Put the metrics from a worker with a source name.
|
public MetricsStore(java.time.Clock clock)
MetricsStore
.clock
- the clock to get time ofpublic void putWorkerMetrics(String source, List<Metric> metrics)
source
- the source namemetrics
- the new worker metricspublic void putClientMetrics(String source, List<Metric> metrics)
source
- the source namemetrics
- the new metricspublic void initMetricKeys()
public 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.public long getLastClearTime()
Copyright © 2023. All Rights Reserved.