-
public final class DynamicConfig<S extends DynamicConfig.Snapshot>Config that can be dynamically updated via remote-config
Only a small subset of config is currently supported
Not every config should be dynamic because there are performance implications
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classDynamicConfig.Builderpublic classDynamicConfig.SnapshotImmutable snapshot of the configuration.
-
Method Summary
Modifier and Type Method Description static DynamicConfig.Buildercreate()Dynamic configuration that uses the default snapshot type. static <S extends DynamicConfig.Snapshot> DynamicConfig.Buildercreate(BiFunction<DynamicConfig.Builder, S, S> snapshotFactory)Dynamic configuration that wants to add its own state to the snapshot. ScaptureTraceConfig()Captures a snapshot of the configuration at the start of a trace. DynamicConfig.Builderinitial()Start building a new configuration based on its initial state. DynamicConfig.Buildercurrent()Start building a new configuration based on its current state. voidresetTraceConfig()Reset the configuration to its initial state. StringtoString()-
-
Method Detail
-
create
static DynamicConfig.Builder create()
Dynamic configuration that uses the default snapshot type.
-
create
static <S extends DynamicConfig.Snapshot> DynamicConfig.Builder create(BiFunction<DynamicConfig.Builder, S, S> snapshotFactory)
Dynamic configuration that wants to add its own state to the snapshot.
-
captureTraceConfig
S captureTraceConfig()
Captures a snapshot of the configuration at the start of a trace.
-
initial
DynamicConfig.Builder initial()
Start building a new configuration based on its initial state.
-
current
DynamicConfig.Builder current()
Start building a new configuration based on its current state.
-
resetTraceConfig
void resetTraceConfig()
Reset the configuration to its initial state.
-
-
-
-