01: /*
02: * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
03: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
04: */
05: package com.sun.portal.monitoring.statistics;
06:
07: import com.sun.portal.monitoring.ResetSupport;
08:
09: import javax.management.j2ee.statistics.Statistic;
10: import java.io.Serializable;
11: import java.util.Calendar;
12:
13: public class StatisticImpl implements Serializable, Statistic,
14: ResetSupport {
15: public String getDescription() {
16: return description;
17: }
18:
19: public void setDescription(String description) {
20: this .description = description;
21: }
22:
23: public long getLastSampleTime() {
24: return lastSampleTime;
25: }
26:
27: public void setLastSampleTime(long lastSampleTime) {
28: this .lastSampleTime = lastSampleTime;
29: }
30:
31: public String getName() {
32: return name;
33: }
34:
35: public void setName(String name) {
36: this .name = name;
37: }
38:
39: public long getStartTime() {
40: return startTime;
41: }
42:
43: public void setStartTime(long startTime) {
44: this .startTime = startTime;
45: }
46:
47: public String getUnit() {
48: return unit;
49: }
50:
51: public void setUnit(String unit) {
52: this .unit = unit;
53: }
54:
55: private String description;
56: private long lastSampleTime;
57: private String name;
58: private long startTime;
59: private String unit;
60:
61: public void reset() {
62: lastSampleTime = Calendar.getInstance().getTimeInMillis();
63: startTime = lastSampleTime;
64: }
65:
66: public StatisticImpl() {
67: reset();
68: }
69: }
|