com.ibm.websphere.pmi.stat
Class TimeStatisticImpl
java.lang.Object
|
+--com.ibm.websphere.pmi.stat.StatisticImpl
|
+--com.ibm.websphere.pmi.stat.TimeStatisticImpl
- All Implemented Interfaces:
- java.io.Serializable, com.ibm.websphere.management.statistics.Statistic, Statistic, com.ibm.websphere.management.statistics.TimeStatistic
- public class TimeStatisticImpl
- extends StatisticImpl
- implements com.ibm.websphere.management.statistics.TimeStatistic
TimeStatisticImpl: implements JSR77's TimeStatistic and extends StatisticImpl.
Note: PMI provides more performance data than JSR77 specification.
A TimeStatistic data in PMI may keep tracking a non-time related metric.
For example, the data tracking the average
read/write size in session manager is of TimeStatistic type but not a time-related metric.
PMI does not invent a new data type since TimeStatistic perfectly match the requirement
except that the name itself might be misleading. However, the unit for the data should
clarify any confusion.
- See Also:
- Serialized Form
Constructor Summary |
TimeStatisticImpl(int dataId)
|
TimeStatisticImpl(int count,
int min,
int max,
int total,
int sumOfSquares,
int startTime,
int lastSampleTime)
|
TimeStatisticImpl(int dataId,
long count,
long min,
long max,
long total,
long sumOfSquares,
long startTime,
long lastSampleTime)
|
TimeStatisticImpl(int id,
java.lang.String name,
java.lang.String unit,
java.lang.String description,
long startTime,
long lastSampleTime)
|
Methods inherited from class com.ibm.websphere.pmi.stat.StatisticImpl |
disable, enable, getDataInfo, getDescription, getId, getLastSampleTime, getName, getStartTime, getUnit, isEnabled, setDataInfo, setDataInfo, setLastSampleTime, setStartTime, toXML |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.ibm.websphere.management.statistics.Statistic |
getDescription, getLastSampleTime, getName, getStartTime, getUnit |
count
protected long count
min
protected long min
max
protected long max
total
protected long total
sumOfSquares
protected long sumOfSquares
TimeStatisticImpl
public TimeStatisticImpl(int dataId)
TimeStatisticImpl
public TimeStatisticImpl(int count,
int min,
int max,
int total,
int sumOfSquares,
int startTime,
int lastSampleTime)
TimeStatisticImpl
public TimeStatisticImpl(int dataId,
long count,
long min,
long max,
long total,
long sumOfSquares,
long startTime,
long lastSampleTime)
TimeStatisticImpl
public TimeStatisticImpl(int id,
java.lang.String name,
java.lang.String unit,
java.lang.String description,
long startTime,
long lastSampleTime)
setDataId
public void setDataId(int id)
add
public void add(long val)
set
public void set(long count,
long min,
long max,
long total,
long sumOfSquares,
long startTime,
long lastSampleTime)
reset
public void reset()
- Description copied from class:
StatisticImpl
- Reset the createTime
- Overrides:
reset
in class StatisticImpl
reset
public void reset(boolean resetAll)
getCount
public long getCount()
- Specified by:
getCount
in interface com.ibm.websphere.management.statistics.TimeStatistic
getTotal
public long getTotal()
getMean
public double getMean()
getTotalTime
public long getTotalTime()
- Specified by:
getTotalTime
in interface com.ibm.websphere.management.statistics.TimeStatistic
getMin
public long getMin()
getMax
public long getMax()
getMinTime
public long getMinTime()
- Specified by:
getMinTime
in interface com.ibm.websphere.management.statistics.TimeStatistic
getMaxTime
public long getMaxTime()
- Specified by:
getMaxTime
in interface com.ibm.websphere.management.statistics.TimeStatistic
getSumOfSquares
public long getSumOfSquares()
combine
public void combine(Statistic otherStat)
- Description copied from class:
StatisticImpl
- Aggregate the value of parameter data to this data
- Overrides:
combine
in class StatisticImpl
- Following copied from class:
com.ibm.websphere.pmi.stat.StatisticImpl
- Parameters:
data
- must have the same data ID and type
toString
public java.lang.String toString()
- Overrides:
toString
in class StatisticImpl
toString
public java.lang.String toString(java.lang.String indent)
- Overrides:
toString
in class StatisticImpl
update
public void update(Statistic otherStat)
- Description copied from class:
StatisticImpl
- Update itself with the new value in data.
- Overrides:
update
in class StatisticImpl
- Following copied from class:
com.ibm.websphere.pmi.stat.StatisticImpl
- Parameters:
data
- must have the same data ID and type
delta
public Statistic delta(Statistic otherStat)
- Overrides:
delta
in class StatisticImpl
- Following copied from class:
com.ibm.websphere.pmi.stat.StatisticImpl
- Parameters:
data
- must have the same data ID and type- Returns:
- an Statistic object whose value is the difference of (this - data)
resetOnClient
public void resetOnClient(Statistic other)
- Description copied from class:
StatisticImpl
- Reset the data value to zero on client side. When using update method, the value
will always be the value since the last reset is called.
- Overrides:
resetOnClient
in class StatisticImpl
- Following copied from class:
com.ibm.websphere.pmi.stat.StatisticImpl
- Parameters:
data
- must have the same data ID and type