Interface TunableOption
- All Known Implementing Classes:
TunableOption.Mutable, TunableOption.OnTune, TunableOption.Polling, TunableOption.Property, TunableOption.Robust, TunableOption.TypeString
public sealed interface TunableOption
permits TunableOption.Robust, TunableOption.Property, TunableOption.TypeString, TunableOption.Mutable, TunableOption.OnTune, TunableOption.Polling
Tunable option.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordBy default, Tunables may be set by a remote source (e.g.static final recordCallback to call when the tunable is modified via tune().static final recordDefines when the backend should poll the tunable's local value.static final recordProperty for tunable.static final recordIndicates whether the tunable should separately echo back its value after setting.static final recordType string for tunable. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TunableOptionIndicates the tunable should get its value on every loop.static final TunableOptionIndicates the tunable should get its value only when it is changed.static final TunableOptionIndicates the tunable is immutable.static final TunableOptionIndicates the tunable is mutable (default).static final TunableOptionIndicates the tunable should not separately echo back its value after setting (default).static final TunableOptionIndicates the tunable should separately echo back its value after setting. -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic TunableOptionCallback to call when the tunable is modified via tune().static TunableOptionpolling(TunableConfig.Polling polling) Defines when the backend should poll the tunable's local value.static TunableOptionProperty for tunable.static TunableOptiontypeString(String typeString) Type string for tunable.
-
Field Details
-
ROBUST
Indicates the tunable should separately echo back its value after setting. -
NOT_ROBUST
Indicates the tunable should not separately echo back its value after setting (default). -
MUTABLE
Indicates the tunable is mutable (default). Mutable tunables call the Tunable's set() function. -
IMMUTABLE
Indicates the tunable is immutable. Immutable tunables never call the Tunable's set() function. -
GET_ON_CHANGE
Indicates the tunable should get its value only when it is changed. -
ALWAYS_GET
Indicates the tunable should get its value on every loop.
-
-
Method Details
-
property
Property for tunable.- Parameters:
key- property keyvalue- property value; must be a valid JSON value string (e.g. quoted string, number, true, false, null, object, or array)- Returns:
- tunable option
-
typeString
Type string for tunable.- Parameters:
typeString- the type string to use for the tunable- Returns:
- tunable option
-
onTune
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
Defines when the backend should poll the tunable's local value.- Parameters:
polling- polling behavior- Returns:
- tunable option
-