Class AverageRangeStatisticImpl
- java.lang.Object
-
- com.sun.enterprise.admin.monitor.stats.AverageRangeStatisticImpl
-
- All Implemented Interfaces:
AverageRangeStatistic,RangeStatistic,Statistic
public class AverageRangeStatisticImpl extends Object implements AverageRangeStatistic
- Author:
- lwhite
-
-
Constructor Summary
Constructors Constructor Description 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.AverageRangeStatisticImpl(BoundedRangeStatisticImpl stats, long numberOfSamples, long runningTotal)Constructs an immutable instance of AverageRangeStatisticImpl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetAverage()longgetCurrent()The current value of this attribute.StringgetDescription()A human-readable description of the Statistic.longgetHighWaterMark()The highest value this attribute has held since the beginning of the measurement.longgetLastSampleTime()The time of the last measurement represented as a long, whose value is the number of milliseconds since January 1, 1970, 00:00:00.longgetLowWaterMark()The lowest value this attribute has held since the beginning of the measurement.StringgetName()The name of this Statistic.longgetStartTime()The time of the first measurement represented as a long, whose value is the number of milliseconds since January 1, 1970, 00:00:00.StringgetUnit()The unit of measurement for this Statistic.voidsetDescription(String desc)This is a hack.
-
-
-
Constructor Detail
-
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 Detail
-
getCurrent
public long getCurrent()
Description copied from interface:RangeStatisticThe current value of this attribute.- Specified by:
getCurrentin interfaceRangeStatistic
-
getDescription
public String 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
public String 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
public String 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
public void setDescription(String desc)
This is a hack. This method allows us to internatinalize the descriptions. See bug Id: 5045413
-
-