package simulator.stats.implementation; import simulator.stats.implementation.out.StatsSerializer; public class MetricsStats implements StatsInterface { protected String resourceName; protected String metricName; protected double value; protected long timestamp; protected String unit; private String[] headers = { "resourceName", "metricName", "value" }; public MetricsStats(String resourceName, String metricName, double value) { this(resourceName, metricName, value, 0, ""); } public MetricsStats(String resourceName, String metricName, double value, long timestamp, String unit) { super(); this.resourceName = resourceName; this.metricName = metricName; this.value = value; this.timestamp = timestamp; this.unit = unit; } public Object serialize(StatsSerializer serializer) { return serializer.visit(this); } public String[] getHeaders() { return headers; } public String getResourceName() { return resourceName; } public String getMetricName() { return metricName; } public double getValue() { return value; } public long getTimestamp() { return timestamp; } public String getUnit() { return unit; } }