Interface MovingAverages

All Known Implementing Classes:
ExponentialMovingAverages, SlidingTimeWindowMovingAverages

public interface MovingAverages
A triple of moving averages (one-, five-, and fifteen-minute moving average) as needed by Meter.

Included implementations are:

  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the fifteen-minute moving average rate
    double
    Returns the one-minute moving average rate
    double
    Returns the five-minute moving average rate
    void
    Tick the internal clock of the MovingAverages implementation if needed (according to the internal ticking interval)
    void
    update(long n)
    Update all three moving averages with n events having occurred since the last update.
  • Method Details

    • tickIfNecessary

      void tickIfNecessary()
      Tick the internal clock of the MovingAverages implementation if needed (according to the internal ticking interval)
    • update

      void update(long n)
      Update all three moving averages with n events having occurred since the last update.
      Parameters:
      n -
    • getM1Rate

      double getM1Rate()
      Returns the one-minute moving average rate
      Returns:
      the one-minute moving average rate
    • getM5Rate

      double getM5Rate()
      Returns the five-minute moving average rate
      Returns:
      the five-minute moving average rate
    • getM15Rate

      double getM15Rate()
      Returns the fifteen-minute moving average rate
      Returns:
      the fifteen-minute moving average rate