Revision 1436,
836 bytes
checked in by wojtekp, 11 years ago
(diff) |
|
-
Property svn:mime-type set to
text/plain
|
Rev | Line | |
---|
[495] | 1 | package simulator.stats.implementation; |
---|
| 2 | |
---|
| 3 | import schedframe.resources.ResourceType; |
---|
| 4 | import simulator.stats.implementation.out.StatsSerializer; |
---|
| 5 | |
---|
[1434] | 6 | public class ResourceAirflowStats extends ResourceDynamicStats implements StatsInterface{ |
---|
[496] | 7 | |
---|
[495] | 8 | protected double sumValue; |
---|
| 9 | |
---|
[1434] | 10 | private String[] headers = { "resourceName", "timestamp", "airflow" }; |
---|
[495] | 11 | |
---|
[1434] | 12 | public ResourceAirflowStats (String resourceName, ResourceType resourceType, String usageType) { |
---|
[496] | 13 | super(resourceName, resourceType, usageType); |
---|
[1207] | 14 | if(usageType == null){ |
---|
| 15 | this.usageType = "airflow_volume"; |
---|
| 16 | } |
---|
[495] | 17 | } |
---|
| 18 | |
---|
[496] | 19 | public void setSumValue(double sumValue) { |
---|
| 20 | this.sumValue = sumValue; |
---|
[495] | 21 | } |
---|
| 22 | |
---|
[496] | 23 | public double getSumValue() { |
---|
| 24 | return sumValue; |
---|
[495] | 25 | } |
---|
[496] | 26 | |
---|
[495] | 27 | public Object serialize(StatsSerializer serializer) { |
---|
| 28 | return serializer.visit(this); |
---|
| 29 | } |
---|
| 30 | |
---|
| 31 | public String[] getHeaders() { |
---|
| 32 | return headers; |
---|
| 33 | } |
---|
| 34 | |
---|
[1436] | 35 | |
---|
[495] | 36 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.