com.ibm.websphere.pmi.stat
Class RangeStatisticImpljava.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, Statistic, com.ibm.websphere.management.statistics.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
Field Summary protected long current
protected long highWaterMark
protected long integral
protected long lowWaterMark
Fields inherited from class com.ibm.websphere.pmi.stat.StatisticImpl serialVersionUID
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)
Method Summary void add(long val)
void add(long curTime, long val)
void cleanup()
void combine(Statistic otherStat)
Aggregate the value of parameter data to this datavoid decrement()
To be called on server side onlyvoid decrement(long decVal)
To be called on server side onlyvoid decrement(long curTime, long val)
Statistic delta(Statistic otherStat)
long getCurrent()
long getHighWaterMark()
long getIntegral()
long getLowWaterMark()
double getMean()
void increment()
To be called on server side onlyvoid increment(long incVal)
To be called on server side onlyvoid increment(long curTime, long val)
long myupdate()
long myupdate(long curTime)
Server side method in order to calculate the time-weighted mean.void reset()
Reset the createTimevoid reset(boolean resetAll)
void resetOnClient(Statistic other)
Reset the data value to zero on client side.void set(long lowWaterMark, long highWaterMark, long current, long integral, long startTime, long lastSampleTime)
void setLastValue(long val)
void setWaterMark(long val)
protected void setWaterMark(long val, long curTime)
java.lang.String toString()
java.lang.String toString(java.lang.String indent)
void update(Statistic otherStat)
Update itself with the new value in data.
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
Field Detail highWaterMark
protected long highWaterMark
lowWaterMark
protected long lowWaterMark
current
protected long current
integral
protected long integral
Constructor Detail 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)
Method Detail reset
public void reset()
- Description copied from class: StatisticImpl
- Reset the createTime
- Specified by:
- reset in interface Statistic
- 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
- Specified by:
- combine in interface Statistic
- Specified by:
- combine in class StatisticImpl
- Parameters:
- otherStat - must have the same data ID and type
cleanup
public void cleanup()
toString
public java.lang.String toString()
- Specified by:
- toString in interface Statistic
- Overrides:
- toString in class StatisticImpl
toString
public java.lang.String toString(java.lang.String indent)
- Specified by:
- toString in interface Statistic
- Overrides:
- toString in class StatisticImpl
update
public void update(Statistic otherStat)
- Description copied from class: StatisticImpl
- Update itself with the new value in data.
- Specified by:
- update in interface Statistic
- Specified by:
- update in class StatisticImpl
- Parameters:
- otherStat - must have the same data ID and type
delta
public Statistic delta(Statistic otherStat)
- Specified by:
- delta in interface Statistic
- Specified by:
- delta in class StatisticImpl
- Parameters:
- otherStat - 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.
- Specified by:
- resetOnClient in interface Statistic
- Specified by:
- resetOnClient in class StatisticImpl
- Parameters:
- other - must have the same data ID and type
WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.