Class UsageFunction

java.lang.Object
com.illumon.iris.db.tables.remotequery.UsageFunction

public class UsageFunction
extends Object
  • Constructor Summary

    Constructors 
    Constructor Description
    UsageFunction​(String name, long intervalMS)
    Constructs a UsageFunction that uses intervalMS as the decay interval in its EMA function, with initial value 0.
  • Method Summary

    Modifier and Type Method Description
    double getValue()  
    boolean isInitialized()  
    void update​(double observation, long observationDurationMS)
    Updates the value of this function according to an Exponential Moving Average (EMA).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • UsageFunction

      public UsageFunction​(String name, long intervalMS)
      Constructs a UsageFunction that uses intervalMS as the decay interval in its EMA function, with initial value 0.
      Parameters:
      name -
      intervalMS -
  • Method Details

    • getValue

      public double getValue()
      Returns:
      The last calculated value for this UsageFunction
    • isInitialized

      public boolean isInitialized()
      Returns:
      The state of this UsageFunction
    • update

      public void update​(double observation, long observationDurationMS)
      Updates the value of this function according to an Exponential Moving Average (EMA).
      Parameters:
      observation -
      observationDurationMS -