DynamicConfig

interface DynamicConfig

Interface for evaluating dynamic flags. Dynamic flags are similar to feature flags, but they don't support different variations for different keys.

Functions

Link copied to clipboard
abstract fun getBoolean(feature: Feature): Boolean

Returns the value of a boolean dynamic flag.

Link copied to clipboard
abstract fun getDouble(feature: Feature): Double

Returns the value of a double dynamic flag.

Link copied to clipboard
abstract fun <T : Enum<T>> getEnum(feature: Feature, clazz: Class<T>): T

Returns the value of an enumerated dynamic flag.

Link copied to clipboard
inline fun <T : Enum<T>> DynamicConfig.getEnum(feature: Feature): T
Link copied to clipboard
abstract fun getInt(feature: Feature): Int

Returns the value of an integer dynamic flag.

Link copied to clipboard
abstract fun <T> getJson(feature: Feature, clazz: Class<T>): T

Returns the value of a JSON dynamic flag.

Link copied to clipboard
inline fun <T> DynamicConfig.getJson(feature: Feature): T
Link copied to clipboard
abstract fun getJsonString(feature: Feature): String

Returns the value of a JSON string value of the dynamic flag.

Link copied to clipboard
abstract fun getString(feature: Feature): String

Returns the value of a string dynamic flag.

Link copied to clipboard
abstract fun trackBoolean(feature: Feature, executor: Executor, tracker: (Boolean) -> Unit): TrackerReference

Registers a boolean dynamic config tracker which will be invoked whenever the boolean dynamic config changes value.

Link copied to clipboard
abstract fun trackDouble(feature: Feature, executor: Executor, tracker: (Double) -> Unit): TrackerReference

Registers a double dynamic config tracker which will be invoked whenever the double dynamic config changes value.

Link copied to clipboard
abstract fun <T : Enum<T>> trackEnum(feature: Feature, clazz: Class<T>, executor: Executor, tracker: (T) -> Unit): TrackerReference

Registers a enum dynamic config tracker which will be invoked whenever the enum dynamic config changes value.

Link copied to clipboard
inline fun <T : Enum<T>> DynamicConfig.trackEnum(feature: Feature, executor: Executor, noinline tracker: (T) -> Unit): TrackerReference
Link copied to clipboard
abstract fun trackInt(feature: Feature, executor: Executor, tracker: (Int) -> Unit): TrackerReference

Registers a integer dynamic config tracker which will be invoked whenever the integer dynamic config changes value.

Link copied to clipboard
abstract fun <T> trackJson(feature: Feature, clazz: Class<T>, executor: Executor, tracker: (T) -> Unit): TrackerReference

Registers a json dynamic config tracker which will be invoked whenever the json dynamic config changes value.

Link copied to clipboard
inline fun <T> DynamicConfig.trackJson(feature: Feature, executor: Executor, noinline tracker: (T) -> Unit): TrackerReference
Link copied to clipboard
abstract fun trackString(feature: Feature, executor: Executor, tracker: (String) -> Unit): TrackerReference

Registers a string dynamic config tracker which will be invoked whenever the string dynamic config changes value.