1 17 package org.apache.geronimo.management.stats; 18 19 import javax.management.j2ee.statistics.JVMStats ; 20 import javax.management.j2ee.statistics.CountStatistic ; 21 import javax.management.j2ee.statistics.BoundedRangeStatistic ; 22 23 28 public class JVMStatsImpl extends StatsImpl implements JVMStats { 29 private final CountStatisticImpl upTime; 30 private final BoundedRangeImpl heapSize; 31 32 public JVMStatsImpl() { 33 upTime = new CountStatisticImpl("JVM Up Time", StatisticImpl.UNIT_TIME_MILLISECOND, 34 "The length of time that the JVM has been running", 0); 35 heapSize = new BoundedRangeImpl("JVM Heap Size", StatisticImpl.UNIT_MEMORY_BYTES, 36 "The memory usage of the JVM"); 37 addStat("UpTime", upTime); 38 addStat("HeapSize", heapSize); 39 } 40 41 public CountStatistic getUpTime() { 42 return upTime; 43 } 44 45 public BoundedRangeStatistic getHeapSize() { 46 return heapSize; 47 } 48 49 52 public CountStatisticImpl getUpTimeImpl() { 53 return upTime; 54 } 55 56 59 public BoundedRangeImpl getHeapSizeImpl() { 60 return heapSize; 61 } 62 } 63 | Popular Tags |