Interface JPPFSnapshot

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractBaseJPPFSnapshot, AbstractJPPFSnapshot, CumulativeSnapshot, NonCumulativeSnapshot, SingleValueSnapshot

public interface JPPFSnapshot extends Serializable
Convenience class for collecting time or size statistics. Instances of this class are thread-safe.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Base class for filters including or excluding snpashots based on a provided set of labels.
    static class 
    Filter excluding snpashots based on a provided set of labels.
    static class 
    Filter including snpashots based on a provided set of labels.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addValues(double accumulatedValues, long count)
    Add a set of aggregated values to this snapshot.
    Make a copy of this time snapshot object.
    double
    Get the average value.
    Get the label for this snapshot.
    long
    Get the time elapsed between the creation of this snapshot and its last update, expresseed in nanos.
    double
    Get the latest observed value.
    double
    Get the peak observed value.
    double
    Get the smallest observed value.
    double
    Get the total cumulated sum of the values.
    long
    Get the count of values added to this snapshot.
    void
    Reset all counters to their initial values.
  • Method Details

    • addValues

      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.
    • copy

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

      void reset()
      Reset all counters to their initial values.
    • getTotal

      double getTotal()
      Get the total cumulated sum of the values.
      Returns:
      the cumulated values as a double.
    • getLatest

      double getLatest()
      Get the latest observed value.
      Returns:
      the latest value as a double.
    • getMin

      double getMin()
      Get the smallest observed value.
      Returns:
      the minimum value as a double.
    • getMax

      double getMax()
      Get the peak observed value.
      Returns:
      the peak value double.
    • getAvg

      double getAvg()
      Get the average value.
      Returns:
      the average value as a double.
    • getLabel

      String getLabel()
      Get the label for this snapshot.
      Returns:
      the label as a string.
    • getValueCount

      long getValueCount()
      Get the count of values added to this snapshot.
      Returns:
      the count of values as a long.
    • getLastUpdateNanos

      long getLastUpdateNanos()
      Get the time elapsed between the creation of this snapshot and its last update, expresseed in nanos.
      Returns:
      the last update time of this snapshot, as the result of calling System.nanoTime() - creationTimeNanos.