Class BoundedRangeStatisticImpl
java.lang.Object
com.sun.enterprise.admin.monitor.stats.StatisticImpl
com.sun.enterprise.admin.monitor.stats.BoundedRangeStatisticImpl
- All Implemented Interfaces:
Serializable,BoundaryStatistic,BoundedRangeStatistic,RangeStatistic,Statistic
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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longDEFAULT_UPPER_BOUND is maximum value Long can attainstatic final longDEFAULT_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
ConstructorsConstructorDescriptionBoundedRangeStatisticImpl(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.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
Modifier and TypeMethodDescriptionlongReturns the current value of this statistic.longReturns the highest value of this statistic, since measurement started.longReturn the lowest possible value, that this statistic is permitted to attain.longReturns the lowest value of this statistic, since measurement started.longReturns the highest possible value, that this statistic is permitted to attain.toString()Methods inherited from class com.sun.enterprise.admin.monitor.stats.StatisticImpl
getDescription, getLastSampleTime, getName, getStartTime, getUnit, setDescriptionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.glassfish.j2ee.statistics.Statistic
getDescription, getLastSampleTime, getName, getStartTime, getUnit
-
Field Details
-
DEFAULT_MAX_BOUND
public static final long DEFAULT_MAX_BOUNDDEFAULT_UPPER_BOUND is maximum value Long can attain- See Also:
-
DEFAULT_MIN_BOUND
public static final long DEFAULT_MIN_BOUNDDEFAULT_LOWER_BOUND is same as DEFAULT_VALUE i.e. 0
-
-
Constructor Details
-
BoundedRangeStatisticImpl
A constructor that creates an instance of class. Following are the defaults:- Unit is defaulted to empty string.
- Description is calculated from the name passed in. This may well be read from a properties file to address i18n.
- LastSampleTime is time at the time of calling this method.
- StartTime is the same as LastSampleTime.
- Current Value is initialized to StatisticImpl#DEFAULT_VALUE.
- UpperBound is initialized to StatisticImpl#DEFAULT_MAX_BOUND.
- LowerBound is initialized to StatisticImpl#DEFAULT_MIN_BOUND.
- HighWaterMark is initialized to Current Value.
- LowWaterMark is initialized to Current Value.
- Parameters:
name- String that indicates the name of this statistic
-
BoundedRangeStatisticImpl
A constructor that creates an instance of class. Following are the defaults:- Description is calculated from the name passed in. This may well be read from a properties file to address i18n.
- LastSampleTime is time at the time of calling this method.
- StartTime is the same as LastSampleTime.
- Current Value is initialized to StatisticImpl#DEFAULT_VALUE.
- UpperBound is initialized to StatisticImpl#DEFAULT_MAX_BOUND.
- LowerBound is initialized to StatisticImpl#DEFAULT_MIN_BOUND.
- HighWaterMark is initialized to Current Value.
- LowWaterMark is initialized to Current Value.
- Parameters:
name- String that indicates the name of this statisticunit- 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:- Description is calculated from the name passed in. This may well be read from a properties file to address i18n.
- LastSampleTime is time at the time of calling this method.
- StartTime is the same as LastSampleTime.
- UpperBound is initialized to StatisticImpl#DEFAULT_MAX_BOUND.
- LowerBound is initialized to StatisticImpl#DEFAULT_MIN_BOUND.
- HighWaterMark is initialized to Current Value.
- LowWaterMark is initialized to Current Value.
- Parameters:
name- String that indicates the name of this statisticunit- String that indicates the unit of this statisticdesc- A brief description of the statistic
-
BoundedRangeStatisticImpl
A constructor that creates an instance of class. Following are the defaults:- LastSampleTime is time at the time of calling this method.
- StartTime is the same as LastSampleTime.
- UpperBound is initialized to StatisticImpl#DEFAULT_MAX_BOUND.
- LowerBound is initialized to StatisticImpl#DEFAULT_MIN_BOUND.
- HighWaterMark is initialized to Current Value.
- LowWaterMark is initialized to Current Value.
- Parameters:
name- String that indicates the name of this statisticunit- String that indicates the unit of this statistic
-
BoundedRangeStatisticImpl
A constructor that creates an instance of class. Following are the defaults:- Description is calculated from the name passed in. This may well be read from a properties file to address i18n.
- LastSampleTime is time at the time of calling this method.
- StartTime is the same as LastSampleTime.
- HighWaterMark is initialized to Current Value.
- LowWaterMark is initialized to Current Value.
- Parameters:
name- String that indicates the name of this statisticunit- String that indicates the unit of this statisticvalue- long that indicates the initial value of this statisticmax- long that indicates the maximum permissible value of this statisticmin- 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:- Description is calculated from the name passed in. This may well be read from a properties file to address i18n.
- LastSampleTime is time at the time of calling this method.
- StartTime is the same as LastSampleTime.
- Parameters:
name- String that indicates the name of this statisticunit- String that indicates the unit of this statisticvalue- long that indicates the initial value of this statisticmax- long that indicates the maximum permissible value of this statisticmin- long that indicates the minimum permissible value of this statistichighMark- long that indicates the high watermark value of this statisticlowMark- 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 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.
-
-
Method Details
-
toString
- Overrides:
toStringin classStatisticImpl
-
getCurrent
public long getCurrent()Returns the current value of this statistic.- Specified by:
getCurrentin interfaceRangeStatistic- Returns:
- long indicating the current value
-
getHighWaterMark
public long getHighWaterMark()Returns the highest value of this statistic, since measurement started.- Specified by:
getHighWaterMarkin interfaceRangeStatistic- Returns:
- long indicating high water mark
-
getLowWaterMark
public long getLowWaterMark()Returns the lowest value of this statistic, since measurement started.- Specified by:
getLowWaterMarkin interfaceRangeStatistic- Returns:
- long indicating low water mark
-
getLowerBound
public long getLowerBound()Return the lowest possible value, that this statistic is permitted to attain.- Specified by:
getLowerBoundin interfaceBoundaryStatistic- Returns:
- long indicating the lower bound
-
getUpperBound
public long getUpperBound()Returns the highest possible value, that this statistic is permitted to attain.- Specified by:
getUpperBoundin interfaceBoundaryStatistic- Returns:
- long indicating the higher bound
-