Package org.jppf.utils.stats
Class AbstractJPPFSnapshot
java.lang.Object
org.jppf.utils.stats.AbstractBaseJPPFSnapshot
org.jppf.utils.stats.AbstractJPPFSnapshot
- All Implemented Interfaces:
Serializable,JPPFSnapshot
- Direct Known Subclasses:
CumulativeSnapshot,NonCumulativeSnapshot
Convenience class for collecting time or size statistics.
Instances of this class are thread-safe.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jppf.utils.stats.JPPFSnapshot
JPPFSnapshot.LabelBasedFilter, JPPFSnapshot.LabelExcludingFilter, JPPFSnapshot.LabelIncludingFilter -
Method Summary
Modifier and TypeMethodDescriptionabstract voidAssign the value ofgetLatest()tomax.doublegetAvg()Get the average value.doubleGet the latest observed value.doublegetMax()Get the peak observed value.doublegetMin()Get the smallest observed value.longGet the count of values added to this snapshot.voidreset()Reset all counters to their initial values.toString()Methods inherited from class org.jppf.utils.stats.AbstractBaseJPPFSnapshot
getLabel, getLastUpdateNanos, getTotalMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jppf.utils.stats.JPPFSnapshot
addValues, copy
-
Method Details
-
reset
public void reset()Reset all counters to their initial values. -
assignLatestToMax
public abstract void assignLatestToMax()Assign the value ofgetLatest()tomax. -
toString
-
getLatest
public double getLatest()Description copied from interface:JPPFSnapshotGet the latest observed value.- Returns:
- the latest value as a double.
-
getMin
public double getMin()Description copied from interface:JPPFSnapshotGet the smallest observed value.- Returns:
- the minimum value as a double.
-
getMax
public double getMax()Description copied from interface:JPPFSnapshotGet the peak observed value.- Returns:
- the peak value double.
-
getAvg
public double getAvg()Description copied from interface:JPPFSnapshotGet the average value.- Returns:
- the average value as a double.
-
getValueCount
public long getValueCount()Description copied from interface:JPPFSnapshotGet the count of values added to this snapshot.- Returns:
- the count of values as a long.
-