FileDocCategorySizeDatePackage
RangeStatisticImpl.javaAPI DocGlassfish v2 API4660Fri May 04 22:25:48 BST 2007com.sun.enterprise.admin.monitor.stats

RangeStatisticImpl

public final class RangeStatisticImpl extends StatisticImpl implements javax.management.j2ee.statistics.RangeStatistic
An implementation of a RangeStatistic. All instances of this class are immutable. Provides all the necessary accessors for properties.
author
Muralidhar Vempaty
author
Kedar Mhaswade
since
S1AS8.0
verison
1.0

Fields Summary
private final long
currentVal
private final long
highWaterMark
private final long
lowWaterMark
Constructors Summary
public RangeStatisticImpl(long curVal, long highMark, long lowMark, String name, String unit, String desc, long startTime, long sampleTime)
Constructs an immutable instance of RangeStatistic.

param
curVal The current value of this statistic
param
highMark The highest value of this statistic, since measurement started
param
lowMark The lowest value of this statistic, since measurement started
param
name The name of the statistic
param
unit The unit of measurement for this statistic
param
desc A brief description of the statistic
param
startTime Time in milliseconds at which the measurement was started
param
sampleTime Time at which the last measurement was done.

        
        super(name, unit, desc, startTime, sampleTime);
        currentVal = curVal;
        highWaterMark = highMark;
        lowWaterMark = lowMark;
    
Methods Summary
public longgetCurrent()
Returns the current value of this statistic.

return
long indicating the current value

        return currentVal;
    
public longgetHighWaterMark()
Returns the highest value of this statistic, since measurement started.

return
long indicating high water mark

        return highWaterMark;
    
public longgetLowWaterMark()
Returns the lowest value of this statistic, since measurement started.

return
long indicating low water mark

        return lowWaterMark;
    
public final java.lang.StringtoString()

        return super.toString() + NEWLINE + 
            "Current: " + getCurrent() + NEWLINE +
            "LowWaterMark: " + getLowWaterMark() + NEWLINE +
            "HighWaterMark: " + getHighWaterMark();