com.ibm.websphere.pmi.stat
Class RangeStatisticImpl
java.lang.Object
|
+--com.ibm.websphere.pmi.stat.StatisticImpl
|
+--com.ibm.websphere.pmi.stat.RangeStatisticImpl
- All Implemented Interfaces:
- com.ibm.websphere.management.statistics.RangeStatistic, java.io.Serializable, com.ibm.websphere.management.statistics.Statistic, Statistic
- Direct Known Subclasses:
- BoundedRangeStatisticImpl
- public class RangeStatisticImpl
- extends StatisticImpl
- implements com.ibm.websphere.management.statistics.RangeStatistic
Implement JSR77's RangeStatistic interface.
Extended to provide time-weighted mean as well as current.
- See Also:
- Serialized Form
Constructor Summary |
RangeStatisticImpl(int dataId)
|
RangeStatisticImpl(int id,
long lowWaterMark,
long highWaterMark,
long current,
long integral,
long startTime,
long lastSampleTime)
|
RangeStatisticImpl(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 |
highWaterMark
protected long highWaterMark
lowWaterMark
protected long lowWaterMark
current
protected long current
integral
protected long integral
RangeStatisticImpl
public RangeStatisticImpl(int dataId)
RangeStatisticImpl
public RangeStatisticImpl(int id,
java.lang.String name,
java.lang.String unit,
java.lang.String description,
long startTime,
long lastSampleTime)
RangeStatisticImpl
public RangeStatisticImpl(int id,
long lowWaterMark,
long highWaterMark,
long current,
long integral,
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)
set
public void set(long lowWaterMark,
long highWaterMark,
long current,
long integral,
long startTime,
long lastSampleTime)
setWaterMark
public void setWaterMark(long val)
setWaterMark
protected void setWaterMark(long val,
long curTime)
getLowWaterMark
public long getLowWaterMark()
- Specified by:
getLowWaterMark
in interface com.ibm.websphere.management.statistics.RangeStatistic
getHighWaterMark
public long getHighWaterMark()
- Specified by:
getHighWaterMark
in interface com.ibm.websphere.management.statistics.RangeStatistic
getCurrent
public long getCurrent()
- Specified by:
getCurrent
in interface com.ibm.websphere.management.statistics.RangeStatistic
getIntegral
public long getIntegral()
getMean
public double getMean()
add
public void add(long val)
increment
public void increment()
- To be called on server side only
increment
public void increment(long incVal)
- To be called on server side only
decrement
public void decrement()
- To be called on server side only
decrement
public void decrement(long decVal)
- To be called on server side only
add
public void add(long curTime,
long val)
increment
public void increment(long curTime,
long val)
decrement
public void decrement(long curTime,
long val)
myupdate
public long myupdate(long curTime)
- Server side method in order to calculate the time-weighted mean.
myupdate
public long myupdate()
setLastValue
public void setLastValue(long val)
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
cleanup
public void cleanup()
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