Class NonCumulativeSnapshot

All Implemented Interfaces:
Serializable, JPPFSnapshot

public class NonCumulativeSnapshot extends AbstractJPPFSnapshot
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:
  • Constructor Details

    • NonCumulativeSnapshot

      public NonCumulativeSnapshot(String label)
      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 of getLatest() to max.
      Specified by:
      assignLatestToMax in class AbstractJPPFSnapshot
    • copy

      public JPPFSnapshot copy()
      Make a copy of this time snapshot object.
      Returns:
      a TimeSnapshot instance.