Package org.jppf.utils.stats
Class CumulativeSnapshot
java.lang.Object
org.jppf.utils.stats.AbstractBaseJPPFSnapshot
org.jppf.utils.stats.AbstractJPPFSnapshot
org.jppf.utils.stats.CumulativeSnapshot
- All Implemented Interfaces:
Serializable,JPPFSnapshot
In this implementation,
getLatest() is computed as the cumulated sum of all values added to the snapshot.
If values are only added, and not removed, then it will always return the same value as getTotal().- 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
ConstructorsConstructorDescriptionCumulativeSnapshot(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
-
CumulativeSnapshot
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.
-