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

java.lang.Object
  extended by com.sun.enterprise.admin.monitor.stats.StatisticImpl
      extended by com.sun.enterprise.admin.monitor.stats.BoundedRangeStatisticImpl
All Implemented Interfaces:
Serializable, BoundaryStatistic, BoundedRangeStatistic, RangeStatistic, Statistic

public final class BoundedRangeStatisticImpl
extends StatisticImpl
implements BoundedRangeStatistic

An implementation of a BoundedRangeStatistic. All instances of this class are immutable. Provides all the necessary accessors for properties.

Since:
S1AS8.0
Author:
Muralidhar Vempaty, Kedar Mhaswade
See Also:
Serialized Form

Field Summary
static long DEFAULT_MAX_BOUND
          DEFAULT_UPPER_BOUND is maximum value Long can attain
static long DEFAULT_MIN_BOUND
          DEFAULT_LOWER_BOUND is same as DEFAULT_VALUE i.e.
 
Fields inherited from class com.sun.enterprise.admin.monitor.stats.StatisticImpl
DEFAULT_UNIT, DEFAULT_VALUE, NEWLINE
 
Constructor Summary
BoundedRangeStatisticImpl(long curVal, long highMark, long lowMark, long upper, long lower, String name, String unit, String desc, long startTime, long sampleTime)
          Constructs an immutable instance of BoundedRangeStatisticImpl.
BoundedRangeStatisticImpl(String name)
          A constructor that creates an instance of class.
BoundedRangeStatisticImpl(String name, String unit)
          A constructor that creates an instance of class.
BoundedRangeStatisticImpl(String name, String unit, long value)
          A constructor that creates an instance of class.
BoundedRangeStatisticImpl(String name, String unit, long value, long max, long min)
          A constructor that creates an instance of class.
BoundedRangeStatisticImpl(String name, String unit, long value, long max, long min, long highMark, long lowMark)
          A constructor that creates an instance of class.
BoundedRangeStatisticImpl(String name, String unit, String desc, long value, long max, long min)
          A constructor that creates an instance of class.
 
Method Summary
 long getCurrent()
          Returns the current value of this statistic.
 long getHighWaterMark()
          Returns the highest value of this statistic, since measurement started.
 long getLowerBound()
          Return the lowest possible value, that this statistic is permitted to attain.
 long getLowWaterMark()
          Returns the lowest value of this statistic, since measurement started.
 long getUpperBound()
          Returns the highest possible value, that this statistic is permitted to attain.
 String toString()
           
 
Methods inherited from class com.sun.enterprise.admin.monitor.stats.StatisticImpl
getDescription, getLastSampleTime, getName, getStartTime, getUnit, setDescription
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.glassfish.j2ee.statistics.Statistic
getDescription, getLastSampleTime, getName, getStartTime, getUnit
 

Field Detail

DEFAULT_MAX_BOUND

public static final long DEFAULT_MAX_BOUND
DEFAULT_UPPER_BOUND is maximum value Long can attain

See Also:
Constant Field Values

DEFAULT_MIN_BOUND

public static final long DEFAULT_MIN_BOUND
DEFAULT_LOWER_BOUND is same as DEFAULT_VALUE i.e. 0

Constructor Detail

BoundedRangeStatisticImpl

public BoundedRangeStatisticImpl(String name)
A constructor that creates an instance of class. Following are the defaults:

Parameters:
name - String that indicates the name of this statistic

BoundedRangeStatisticImpl

public BoundedRangeStatisticImpl(String name,
                                 String unit)
A constructor that creates an instance of class. Following are the defaults:

Parameters:
name - String that indicates the name of this statistic
unit - String that indicates the unit of this statistic

BoundedRangeStatisticImpl

public BoundedRangeStatisticImpl(String name,
                                 String unit,
                                 String desc,
                                 long value,
                                 long max,
                                 long min)
A constructor that creates an instance of class. Following are the defaults:

Parameters:
name - String that indicates the name of this statistic
unit - String that indicates the unit of this statistic
desc - A brief description of the statistic

BoundedRangeStatisticImpl

public BoundedRangeStatisticImpl(String name,
                                 String unit,
                                 long value)
A constructor that creates an instance of class. Following are the defaults:

Parameters:
name - String that indicates the name of this statistic
unit - String that indicates the unit of this statistic

BoundedRangeStatisticImpl

public BoundedRangeStatisticImpl(String name,
                                 String unit,
                                 long value,
                                 long max,
                                 long min)
A constructor that creates an instance of class. Following are the defaults:

Parameters:
name - String that indicates the name of this statistic
unit - String that indicates the unit of this statistic
value - long that indicates the initial value of this statistic
max - long that indicates the maximum permissible value of this statistic
min - long that indicates the minimum permissible value of this statistic

BoundedRangeStatisticImpl

public BoundedRangeStatisticImpl(String name,
                                 String unit,
                                 long value,
                                 long max,
                                 long min,
                                 long highMark,
                                 long lowMark)
A constructor that creates an instance of class. Following are the defaults:

Parameters:
name - String that indicates the name of this statistic
unit - String that indicates the unit of this statistic
value - long that indicates the initial value of this statistic
max - long that indicates the maximum permissible value of this statistic
min - long that indicates the minimum permissible value of this statistic
highMark - long that indicates the high watermark value of this statistic
lowMark - long that indicates the low watermark value of this statistic

BoundedRangeStatisticImpl

public BoundedRangeStatisticImpl(long curVal,
                                 long highMark,
                                 long lowMark,
                                 long upper,
                                 long lower,
                                 String name,
                                 String unit,
                                 String desc,
                                 long startTime,
                                 long sampleTime)
Constructs an immutable instance of BoundedRangeStatisticImpl.

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.
Method Detail

toString

public String toString()
Overrides:
toString in class StatisticImpl

getCurrent

public long getCurrent()
Returns the current value of this statistic.

Specified by:
getCurrent in interface RangeStatistic
Returns:
long indicating the current value

getHighWaterMark

public long getHighWaterMark()
Returns the highest value of this statistic, since measurement started.

Specified by:
getHighWaterMark in interface RangeStatistic
Returns:
long indicating high water mark

getLowWaterMark

public long getLowWaterMark()
Returns the lowest value of this statistic, since measurement started.

Specified by:
getLowWaterMark in interface RangeStatistic
Returns:
long indicating low water mark

getLowerBound

public long getLowerBound()
Return the lowest possible value, that this statistic is permitted to attain.

Specified by:
getLowerBound in interface BoundaryStatistic
Returns:
long indicating the lower bound

getUpperBound

public long getUpperBound()
Returns the highest possible value, that this statistic is permitted to attain.

Specified by:
getUpperBound in interface BoundaryStatistic
Returns:
long indicating the higher bound


Copyright © 2012. All Rights Reserved.