Methods Summary |
---|
public long | getAverage()
if(numberOfSamples == 0) {
return -1;
} else {
return runningTotal / numberOfSamples;
}
|
public long | getCurrent()
return mutableBoundedRangeStat.getCurrent();
|
public java.lang.String | getDescription()
return description;
//return mutableBoundedRangeStat.getDescription();
|
public long | getHighWaterMark()
return mutableBoundedRangeStat.getHighWaterMark();
|
public long | getLastSampleTime()
return mutableBoundedRangeStat.getLastSampleTime();
|
public long | getLowWaterMark()
long result = mutableBoundedRangeStat.getLowWaterMark();
if(result == DEFAULT_MAX_BOUND) {
result = 0L;
}
return result;
|
public java.lang.String | getName()
return mutableBoundedRangeStat.getName();
|
public long | getStartTime()
return mutableBoundedRangeStat.getStartTime();
|
public java.lang.String | getUnit()
return mutableBoundedRangeStat.getUnit();
|
public javax.management.j2ee.statistics.Statistic | modifiableView()
return this;
|
public void | reset()
mutableBoundedRangeStat.reset();
this.resetAverageStats();
|
private void | resetAverageStats()
numberOfSamples = 0L;
runningTotal = 0L;
|
public void | setCount(long current)
mutableBoundedRangeStat.setCount(current);
if(DEFAULT_MAX_BOUND - runningTotal < current) {
this.resetAverageStats();
}
numberOfSamples++;
runningTotal += current;
|
public javax.management.j2ee.statistics.Statistic | unmodifiableView()
return ( new AverageRangeStatisticImpl(
this.getCurrent(), // this is the actual changing statistic
this.getHighWaterMark(), // highWaterMark may change per current
this.getLowWaterMark(), // lowWaterMark may change per current
mutableBoundedRangeStat.getUpperBound(), // upperBound is not designed to change
mutableBoundedRangeStat.getLowerBound(), // lowerBound is not designed to change
mutableBoundedRangeStat.getName(), // name does not change
mutableBoundedRangeStat.getUnit(), // unit does not change
mutableBoundedRangeStat.getDescription(), // description does not change
this.getLastSampleTime(), // changes all the time!
this.getStartTime(), // changes if reset is called earlier
this.numberOfSamples, // this is the current number of samples
this.runningTotal // this is the current running total
));
|