AverageRangeStatisticImplpublic class AverageRangeStatisticImpl extends Object implements AverageRangeStatistic
Fields Summary |
---|
private BoundedRangeStatisticImpl | boundedRangeStatistic | private long | numberOfSamples | private long | runningTotal |
Constructors Summary |
---|
public AverageRangeStatisticImpl(long curVal, long highMark, long lowMark, long upper, long lower, String name, String unit, String desc, long startTime, long sampleTime, long numberOfSamples, long runningTotal)Constructs an immutable instance of AverageRangeStatisticImpl.
boundedRangeStatistic = new BoundedRangeStatisticImpl(curVal, highMark, lowMark,
upper, lower, name,
unit, desc, startTime,
sampleTime);
this.numberOfSamples = numberOfSamples;
this.runningTotal = runningTotal;
| public AverageRangeStatisticImpl(BoundedRangeStatisticImpl stats, long numberOfSamples, long runningTotal)Constructs an immutable instance of AverageRangeStatisticImpl.
boundedRangeStatistic = stats;
this.numberOfSamples = numberOfSamples;
this.runningTotal = runningTotal;
|
Methods Summary |
---|
public long | getAverage()
if(numberOfSamples == 0) {
return -1;
} else {
return runningTotal / numberOfSamples;
}
| public long | getCurrent()
return boundedRangeStatistic.getCurrent();
| public java.lang.String | getDescription()
return boundedRangeStatistic.getDescription();
| public long | getHighWaterMark()
return boundedRangeStatistic.getHighWaterMark();
| public long | getLastSampleTime()
return boundedRangeStatistic.getLastSampleTime();
| public long | getLowWaterMark()
return boundedRangeStatistic.getLowWaterMark();
| public java.lang.String | getName()
return boundedRangeStatistic.getName();
| public long | getStartTime()
return boundedRangeStatistic.getStartTime();
| public java.lang.String | getUnit()
return boundedRangeStatistic.getUnit();
| public void | setDescription(java.lang.String desc)This is a hack. This method allows us to internatinalize the descriptions.
See bug Id: 5045413
this.boundedRangeStatistic.setDescription(desc);
|
|