KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > stats > counter > sampled > TimeStampedCounterValue


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.stats.counter.sampled;
5
6 import java.io.Serializable JavaDoc;
7
8 /**
9  * A counter value at a particular time instance
10  */

11 public class TimeStampedCounterValue implements Serializable JavaDoc {
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 JavaDoc toString() {
29     return "value: " + this.counterValue + ", timestamp: " + this.timestamp;
30   }
31
32 }
33
Popular Tags