Class StatisticImpl
java.lang.Object
com.sun.enterprise.admin.monitor.stats.StatisticImpl
- All Implemented Interfaces:
Serializable,Statistic
- Direct Known Subclasses:
BoundaryStatisticImpl,BoundedRangeStatisticImpl,CountStatisticImpl,RangeStatisticImpl,StringStatisticImpl,TimeStatisticImpl
An abstract class providing implementation of the Statistic interface
The intent is for this to be subclassed by all the StatisticImpls.
- Since:
- S1AS8.0
- Version:
- 1.0
- Author:
- Muralidhar Vempaty
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedStatisticImpl(String name, String unit, String desc, long start_time, long sample_time) Constructor -
Method Summary
Modifier and TypeMethodDescriptionreturns the description of the statisticlongreturns the time in millis, at which the last measurement was takengetName()returns the name of the statisticlongreturns the time in millis, at which the first measurement was takengetUnit()returns the unit of measurement for the statisticvoidsetDescription(String desc) This is a hack.toString()
-
Field Details
-
DEFAULT_UNIT
DEFAULT_UNIT is an empty string -
localStrMgr
public static final com.sun.enterprise.util.i18n.StringManager localStrMgr -
DEFAULT_VALUE
public static final long DEFAULT_VALUEDEFAULT_VALUE of any statistic is 0 -
NEWLINE
-
-
Constructor Details
-
StatisticImpl
Constructor- Parameters:
name- 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
-
getName
returns the name of the statistic -
getDescription
returns the description of the statistic- Specified by:
getDescriptionin interfaceStatistic
-
getUnit
returns the unit of measurement for the statistic -
getLastSampleTime
public long getLastSampleTime()returns the time in millis, at which the last measurement was taken- Specified by:
getLastSampleTimein interfaceStatistic
-
getStartTime
public long getStartTime()returns the time in millis, at which the first measurement was taken- Specified by:
getStartTimein interfaceStatistic
-
setDescription
This is a hack. This method allows us to internatinalize the descriptions. See bug Id: 5045413 -
toString
-