Interface TunableOption

All Known Implementing Classes:
TunableOption.Mutable, TunableOption.OnTune, TunableOption.Polling, TunableOption.Property, TunableOption.Robust, TunableOption.TypeString

  • Field Details

    • ROBUST

      static final TunableOption ROBUST
      Indicates the tunable should separately echo back its value after setting.
    • NOT_ROBUST

      static final TunableOption NOT_ROBUST
      Indicates the tunable should not separately echo back its value after setting (default).
    • MUTABLE

      static final TunableOption MUTABLE
      Indicates the tunable is mutable (default). Mutable tunables call the Tunable's set() function.
    • IMMUTABLE

      static final TunableOption IMMUTABLE
      Indicates the tunable is immutable. Immutable tunables never call the Tunable's set() function.
    • GET_ON_CHANGE

      static final TunableOption GET_ON_CHANGE
      Indicates the tunable should get its value only when it is changed.
    • ALWAYS_GET

      static final TunableOption ALWAYS_GET
      Indicates the tunable should get its value on every loop.
  • Method Details

    • property

      static TunableOption property(String key, String value)
      Property for tunable.
      Parameters:
      key - property key
      value - property value; must be a valid JSON value string (e.g. quoted string, number, true, false, null, object, or array)
      Returns:
      tunable option
    • typeString

      static TunableOption typeString(String typeString)
      Type string for tunable.
      Parameters:
      typeString - the type string to use for the tunable
      Returns:
      tunable option
    • onTune

      static TunableOption onTune(Runnable callback)
      Callback to call when the tunable is modified via tune(). This is called immediately after the tunable's tune() function is called. The callback will be called by TunableRegistry.update() and must not throw.
      Parameters:
      callback - the callback to call when the tunable is modified via tune()
      Returns:
      tunable option
    • polling

      static TunableOption polling(TunableConfig.Polling polling)
      Defines when the backend should poll the tunable's local value.
      Parameters:
      polling - polling behavior
      Returns:
      tunable option