01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.stats.counter.sampled;
05:
06: import java.io.Serializable;
07:
08: /**
09: * A counter value at a particular time instance
10: */
11: public class TimeStampedCounterValue implements Serializable {
12: private final long counterValue;
13: private final long timestamp;
14:
15: public TimeStampedCounterValue(long timestamp, long value) {
16: this .timestamp = timestamp;
17: this .counterValue = value;
18: }
19:
20: public long getCounterValue() {
21: return this .counterValue;
22: }
23:
24: public long getTimestamp() {
25: return this .timestamp;
26: }
27:
28: public String toString() {
29: return "value: " + this .counterValue + ", timestamp: "
30: + this.timestamp;
31: }
32:
33: }
|