1 22 package org.jboss.management.j2ee.statistics; 23 24 import javax.management.j2ee.statistics.BoundedRangeStatistic ; 25 26 32 public class BoundedRangeStatisticImpl 33 extends StatisticImpl 34 implements BoundedRangeStatistic 35 { 36 40 41 private static final long serialVersionUID = 3607798304045224550L; 42 43 47 protected BoundaryStatisticImpl boundaryStat; 48 protected RangeStatisticImpl rangeStat; 49 50 54 63 public BoundedRangeStatisticImpl(String name, String units, String description, 64 long lowerBound, long upperBound) 65 { 66 super(name, units, description); 67 boundaryStat = new BoundaryStatisticImpl(name, units, description, 68 lowerBound, upperBound); 69 rangeStat = new RangeStatisticImpl(name, units, description); 70 } 71 72 76 79 public long getCurrent() 80 { 81 return rangeStat.getCurrent(); 82 } 83 84 87 public long getHighWaterMark() 88 { 89 return rangeStat.getHighWaterMark(); 90 } 91 92 95 public long getLowWaterMark() 96 { 97 return rangeStat.getLowWaterMark(); 98 } 99 100 103 public long getLowerBound() 104 { 105 return boundaryStat.getLowerBound(); 106 } 107 108 111 public long getUpperBound() 112 { 113 return boundaryStat.getUpperBound(); 114 } 115 116 119 public String toString() 120 { 121 return "BoundedRangeStatistics[ " + rangeStat.toString() + ", " + boundaryStat.toString() + " ]"; 122 } 123 124 128 131 public void add() 132 { 133 rangeStat.add(); 134 } 135 136 139 public void remove() 140 { 141 rangeStat.remove(); 142 } 143 144 147 public void reset() 148 { 149 rangeStat.reset(); 150 } 151 152 157 public void set(long current) 158 { 159 rangeStat.set(current); 160 } 161 } 162 | Popular Tags |