com.sun.enterprise.admin.monitor.stats
Class AverageRangeStatisticImpl

java.lang.Object
  extended by com.sun.enterprise.admin.monitor.stats.AverageRangeStatisticImpl
All Implemented Interfaces:
AverageRangeStatistic, RangeStatistic, Statistic

public class AverageRangeStatisticImpl
extends Object
implements AverageRangeStatistic

Author:
lwhite

Constructor Summary
AverageRangeStatisticImpl(BoundedRangeStatisticImpl stats, long numberOfSamples, long runningTotal)
          Constructs an immutable instance of AverageRangeStatisticImpl.
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.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 statistic
highMark - The highest value of this statistic, since measurement started
lowMark - The lowest value of this statistic, since measurement started
upper - The upper limit of this statistic
lower - The lower limit of this statistic
name - The name of the statistic
unit - The unit of measurement for this statistic
desc - A brief description of the statistic
startTime - Time in milliseconds at which the measurement was started
sampleTime - Time at which the last measurement was done.
numberOfSamples - number of samples at present
runningTotal - 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 BoundedRangeStatisticImpl
numberOfSamples - number of samples at present
runningTotal - 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 interface RangeStatistic

getDescription

public String getDescription()
Description copied from interface: Statistic
A human-readable description of the Statistic.

Specified by:
getDescription in interface Statistic

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 interface RangeStatistic

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 interface Statistic

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 interface RangeStatistic

getName

public String getName()
Description copied from interface: Statistic
The name of this Statistic.

Specified by:
getName in interface 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 interface Statistic

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".

Specified by:
getUnit in interface Statistic

getAverage

public long getAverage()
Specified by:
getAverage in interface AverageRangeStatistic

setDescription

public void setDescription(String desc)
This is a hack. This method allows us to internatinalize the descriptions. See bug Id: 5045413



Copyright © 2012. All Rights Reserved.