Jagger
 All Classes Namespaces Files Functions Variables Enumerator Groups Pages
MetricDescription.java
Go to the documentation of this file.
1 package com.griddynamics.jagger.engine.e1.collector;
2 
3 import com.google.common.collect.Lists;
4 import com.google.common.collect.Maps;
5 
6 import java.io.Serializable;
7 import java.util.List;
8 import java.util.Map;
9 
17 public class MetricDescription implements Serializable{
18 
19  protected String id;
20  protected String displayName;
21  protected boolean showSummary = true;
22  protected boolean plotData;
23  protected Map<MetricAggregatorProvider, MetricAggregatorSettings> aggregatorsWithSettings = Maps.newHashMap();
24 
27  public MetricDescription(String metricId) {
28  this.id = metricId;
29  }
30 
33  public String getMetricId() {
34  return this.id;
35  }
38  public void setMetricId(String metricId){
39  this.id = metricId;
40  }
41 
44  public String getDisplayName() {
45  return displayName;
46  }
49  public void setDisplayName(String displayName) {
50  this.displayName = displayName;
51  }
52 
55  public List<MetricAggregatorProvider> getAggregators() {
56  return Lists.newArrayList(aggregatorsWithSettings.keySet());
57  }
62  public void setAggregators(List<MetricAggregatorProvider> aggregators) {
64  for (MetricAggregatorProvider aggregator : aggregators) {
66  }
67  }
68 
71  public Map<MetricAggregatorProvider, MetricAggregatorSettings> getAggregatorsWithSettings() {
73  }
74 
80  public void setAggregatorsWithSettings(Map<MetricAggregatorProvider, MetricAggregatorSettings> aggregatorsWithSettings) {
81  this.aggregatorsWithSettings = aggregatorsWithSettings;
82  }
83 
86  public boolean getShowSummary() {
87  return showSummary;
88  }
91  public void setShowSummary(boolean showSummary) {
92  this.showSummary = showSummary;
93  }
94 
97  public boolean getPlotData() {
98  return plotData;
99  }
102  public void setPlotData(boolean plotData) {
103  this.plotData = plotData;
104  }
105 
110  this.showSummary = showSummary;
111  return this;
112  }
117  this.plotData = plotData;
118  return this;
119  }
124  this.displayName = displayName;
125  return this;
126  }
127 
132  public MetricDescription addAggregator(MetricAggregatorProvider aggregator){
134  return this;
135  }
136 
142  public MetricDescription addAggregator(MetricAggregatorProvider aggregator, MetricAggregatorSettings settings){
143  this.aggregatorsWithSettings.put(aggregator, settings);
144  return this;
145  }
146 }