Class AverageRangeStatisticImpl
java.lang.Object
com.sun.enterprise.admin.monitor.stats.AverageRangeStatisticImpl
- All Implemented Interfaces:
AverageRangeStatistic,RangeStatistic,Statistic
- Author:
- lwhite
-
Constructor Summary
ConstructorsConstructorDescriptionAverageRangeStatisticImpl(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.AverageRangeStatisticImpl(BoundedRangeStatisticImpl stats, long numberOfSamples, long runningTotal) Constructs an immutable instance of AverageRangeStatisticImpl. -
Method Summary
Modifier and TypeMethodDescriptionlonglongThe current value of this attribute.A human-readable description of the Statistic.longThe highest value this attribute has held since the beginning of the measurement.longThe time of the last measurement represented as a long, whose value is the number of milliseconds since January 1, 1970, 00:00:00.longThe lowest value this attribute has held since the beginning of the measurement.getName()The name of this Statistic.longThe time of the first measurement represented as a long, whose value is the number of milliseconds since January 1, 1970, 00:00:00.getUnit()The unit of measurement for this Statistic.voidsetDescription(String desc) This is a hack.
-
Constructor Details
-
AverageRangeStatisticImpl
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.- Parameters:
curVal- The current value of this statistichighMark- The highest value of this statistic, since measurement startedlowMark- The lowest value of this statistic, since measurement startedupper- The upper limit of this statisticlower- The lower limit of this statisticname- The name of the statisticunit- The unit of measurement for this statisticdesc- A brief description of the statisticstartTime- Time in milliseconds at which the measurement was startedsampleTime- Time at which the last measurement was done.numberOfSamples- number of samples at presentrunningTotal- running total of sampled data at present
-
AverageRangeStatisticImpl
public AverageRangeStatisticImpl(BoundedRangeStatisticImpl stats, long numberOfSamples, long runningTotal) Constructs an immutable instance of AverageRangeStatisticImpl.- Parameters:
stats- a BoundedRangeStatisticImplnumberOfSamples- number of samples at presentrunningTotal- running total of sampled data at present
-
-
Method Details
-
getCurrent
public long getCurrent()Description copied from interface:RangeStatisticThe current value of this attribute.- Specified by:
getCurrentin interfaceRangeStatistic
-
getDescription
Description copied from interface:StatisticA human-readable description of the Statistic.- Specified by:
getDescriptionin interfaceStatistic
-
getHighWaterMark
public long getHighWaterMark()Description copied from interface:RangeStatisticThe highest value this attribute has held since the beginning of the measurement.- Specified by:
getHighWaterMarkin interfaceRangeStatistic
-
getLastSampleTime
public long getLastSampleTime()Description copied from interface:StatisticThe time of the last measurement represented as a long, whose value is the number of milliseconds since January 1, 1970, 00:00:00.- Specified by:
getLastSampleTimein interfaceStatistic
-
getLowWaterMark
public long getLowWaterMark()Description copied from interface:RangeStatisticThe lowest value this attribute has held since the beginning of the measurement.- Specified by:
getLowWaterMarkin interfaceRangeStatistic
-
getName
Description copied from interface:StatisticThe name of this Statistic. -
getStartTime
public long getStartTime()Description copied from interface:StatisticThe time of the first measurement represented as a long, whose value is the number of milliseconds since January 1, 1970, 00:00:00.- Specified by:
getStartTimein interfaceStatistic
-
getUnit
Description copied from interface:StatisticThe unit of measurement for this Statistic. Valid values for TimeStatistic measurements are "HOUR", "MINUTE", "SECOND", "MILLISECOND", "MICROSECOND" and "NANOSECOND". -
getAverage
public long getAverage()- Specified by:
getAveragein interfaceAverageRangeStatistic
-
setDescription
This is a hack. This method allows us to internatinalize the descriptions. See bug Id: 5045413
-