blob: ec1f66b418f8f3001804414be250fdb730fe088f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.model.admin.monitoring;
import javax.annotation.concurrent.Immutable;
import java.util.Map;
/**
* Represents an arbitrary metric consumer
*
* @author trygve
*/
@Immutable
public class MetricsConsumer {
private final String id;
private final MetricSet metricSet;
/**
* @param id The consumer
* @param metricSet The metrics for this consumer
*/
public MetricsConsumer(String id, MetricSet metricSet) {
this.id = id;
this.metricSet = metricSet;
}
public String getId() {
return id;
}
public MetricSet getMetricSet() { return metricSet; }
/**
* @return Map of metric with metric name as key
*/
public Map<String, Metric> getMetrics() {
return metricSet.getMetrics();
}
}
|