Package org.jppf.utils.stats
Class NonCumulativeSnapshot
java.lang.Object
org.jppf.utils.stats.AbstractBaseJPPFSnapshot
org.jppf.utils.stats.AbstractJPPFSnapshot
org.jppf.utils.stats.NonCumulativeSnapshot
- All Implemented Interfaces:
Serializable,JPPFSnapshot
In this implementation,
getLatest() is computed as the average of the latest set of values that were added, or the latest value if only one was added.- Author:
- Laurent Cohen
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jppf.utils.stats.JPPFSnapshot
JPPFSnapshot.LabelBasedFilter, JPPFSnapshot.LabelExcludingFilter, JPPFSnapshot.LabelIncludingFilter -
Constructor Summary
ConstructorsConstructorDescriptionNonCumulativeSnapshot(String label) Initialize this snapshot with a specified title. -
Method Summary
Methods inherited from class org.jppf.utils.stats.AbstractJPPFSnapshot
getAvg, getLatest, getMax, getMin, getValueCount, reset, toStringMethods inherited from class org.jppf.utils.stats.AbstractBaseJPPFSnapshot
getLabel, getLastUpdateNanos, getTotal
-
Constructor Details
-
NonCumulativeSnapshot
Initialize this snapshot with a specified title.- Parameters:
label- the title for this snapshot.
-
-
Method Details
-
addValues
public void addValues(double accumulatedValues, long count) Add a set of aggregated values to this snapshot.- Parameters:
accumulatedValues- the accumulated sum of the values to add.count- the number of values in the accumalated values.
-
assignLatestToMax
public void assignLatestToMax()Assign the value ofgetLatest()tomax.- Specified by:
assignLatestToMaxin classAbstractJPPFSnapshot
-
copy
Make a copy of this time snapshot object.- Returns:
- a
TimeSnapshotinstance.
-