01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */package org.apache.geronimo.management.stats;
17:
18: import javax.management.j2ee.statistics.TimeStatistic;
19:
20: /**
21: * @version $Rev: 503407 $ $Date: 2007-02-04 05:57:40 -0800 (Sun, 04 Feb 2007) $
22: */
23: public class TimeStatisticImpl extends StatisticImpl implements
24: TimeStatistic {
25: long count;
26: long minTime;
27: long maxTime;
28: long totalTime;
29:
30: public TimeStatisticImpl(String name, String unit,
31: String description) {
32: super (name, unit, description);
33: }
34:
35: public long getCount() {
36: return count;
37: }
38:
39: public void setCount(long count) {
40: this .count = count;
41: }
42:
43: public long getMinTime() {
44: return minTime;
45: }
46:
47: public void setMinTime(long minTime) {
48: this .minTime = minTime;
49: }
50:
51: public long getMaxTime() {
52: return maxTime;
53: }
54:
55: public void setMaxTime(long maxTime) {
56: this .maxTime = maxTime;
57: }
58:
59: public long getTotalTime() {
60: return totalTime;
61: }
62:
63: public void setTotalTime(long totalTime) {
64: this .totalTime = totalTime;
65: }
66:
67: public String toString() {
68: return (getName() + " in " + getUnit() + " -- count: " + count
69: + ", minTime: " + minTime + ", maxTime: " + maxTime
70: + ", totalTime: " + totalTime);
71: }
72: }
|