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
An implementation of a AverageRangeStatistic. All instances of this class are immutable. Provides all the necessary accessors for properties.- Since:
- S1AS8.1
- Version:
- 1.0
- Author:
- Larry White, Kedar Mhaswade
-
-
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 long
getAverage()
long
getCurrent()
The current value of this attribute.String
getDescription()
A human-readable description of the Statistic.long
getHighWaterMark()
The highest value this attribute has held since the beginning of the measurement.long
getLastSampleTime()
The time of the last measurement represented as a long, whose value is the number of milliseconds since January 1, 1970, 00:00:00.long
getLowWaterMark()
The lowest value this attribute has held since the beginning of the measurement.String
getName()
The name of this Statistic.long
getStartTime()
The time of the first measurement represented as a long, whose value is the number of milliseconds since January 1, 1970, 00:00:00.String
getUnit()
The unit of measurement for this Statistic.void
setDescription(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:RangeStatistic
The current value of this attribute.- Specified by:
getCurrent
in interfaceRangeStatistic
-
getDescription
public String getDescription()
Description copied from interface:Statistic
A human-readable description of the Statistic.- Specified by:
getDescription
in interfaceStatistic
-
getHighWaterMark
public long getHighWaterMark()
Description copied from interface:RangeStatistic
The highest value this attribute has held since the beginning of the measurement.- Specified by:
getHighWaterMark
in interfaceRangeStatistic
-
getLastSampleTime
public long getLastSampleTime()
Description copied from interface:Statistic
The 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:
getLastSampleTime
in interfaceStatistic
-
getLowWaterMark
public long getLowWaterMark()
Description copied from interface:RangeStatistic
The lowest value this attribute has held since the beginning of the measurement.- Specified by:
getLowWaterMark
in interfaceRangeStatistic
-
getName
public String getName()
Description copied from interface:Statistic
The name of this Statistic.
-
getStartTime
public long getStartTime()
Description copied from interface:Statistic
The 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:
getStartTime
in interfaceStatistic
-
getUnit
public String getUnit()
Description copied from interface:Statistic
The 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:
getAverage
in interfaceAverageRangeStatistic
-
setDescription
public void setDescription(String desc)
This is a hack. This method allows us to internatinalize the descriptions. See bug Id: 5045413
-
-