source: DCWoRMS/trunk/src/simulator/stats/implementation/ResourceDynamicStats.java @ 496

Revision 496, 1.1 KB checked in by wojtekp, 13 years ago (diff)
  • Property svn:mime-type set to text/plain
Line 
1package simulator.stats.implementation;
2
3import java.util.Map;
4import java.util.TreeMap;
5
6import schedframe.resources.ResourceType;
7
8public abstract class ResourceDynamicStats {
9       
10        protected Map<Long, Double> history;
11        protected String resourceName;
12        protected String usageType;
13        protected ResourceType resourceType;
14        protected double meanValue;
15
16        private String[] headers = { "resourceName", "timestamp", "usage" };
17
18        public ResourceDynamicStats(String resourceName, ResourceType resourceType, String usageType) {
19                this.resourceName = resourceName;
20                this.resourceType = resourceType;
21                this.usageType = usageType;
22                this.history = new TreeMap<Long, Double>();
23                this.meanValue = 0;
24        }
25
26        public void setMeanValue(double meanValue) {
27                this.meanValue = meanValue;
28        }
29       
30        public double getMeanValue() {
31                return meanValue;
32        }
33
34        public String getResourceName() {
35                return this.resourceName;
36        }
37       
38        public ResourceType getResourceType() {
39                return resourceType;
40        }
41       
42        public String getUsageType() {
43                return this.usageType;
44        }       
45
46        public Map<Long, Double> getHistory() {
47                return this.history;
48        }
49
50        public String[] getHeaders() {
51                return headers;
52        }
53}
Note: See TracBrowser for help on using the repository browser.