A ToggleMap implementation based on immutable Toggle.Metadata.
The ToggleMap interface is read only and this is the mutable side of it.
The ToggleMap interface is read only and this is the mutable side of it.
Implementations are expected to be thread-safe.
A ToggleMap that proxies work to underlying
.
A ToggleMap which returns Toggle.off for all ids
.
A ToggleMap which returns Toggle.off for all ids
.
ToggleMap.iterator will always be empty.
A ToggleMap which returns Toggle.on for all ids
.
ToggleMap.iterator will always be empty.
For some administrative purposes, it can be useful to get at the
component ToggleMaps
that may make up a ToggleMap.
For some administrative purposes, it can be useful to get at the
component ToggleMaps
that may make up a ToggleMap.
For example:
val toggleMap1: ToggleMap = ... val toggleMap2: ToggleMap = ... val combined = toggleMap1.orElse(toggleMap2) assert(Seq(toggleMap1, toggleMap2) == ToggleMap.components(combined))
A ToggleMap that is backed by a com.twitter.app.GlobalFlag
,
flag.overrides.
A ToggleMap that is backed by a com.twitter.app.GlobalFlag
,
flag.overrides.
Its Toggles will reflect changes to the underlying Flag
which
enables usage in tests.
Fractions that are out of range (outside of [0.0-1.0]
) will be
ignored.
that inputs to Toggle.apply will be modified to promote better distributions in the face of low entropy inputs.
Create an empty Mutable instance with the given Metadata.source.
Create an empty Mutable instance with the given Metadata.source.
that inputs to Toggle.apply will be modified to promote better distributions in the face of low entropy inputs.
Create an empty Mutable instance with a default Metadata.source specified.
Create an empty Mutable instance with a default Metadata.source specified.
that inputs to Toggle.apply will be modified to promote better distributions in the face of low entropy inputs.
Creates a ToggleMap with a Gauge
, "checksum", which summarizes the
current state of the Toggles
which may be useful for comparing state
across a cluster or over time.
Creates a ToggleMap with a Gauge
, "checksum", which summarizes the
current state of the Toggles
which may be useful for comparing state
across a cluster or over time.
in typical usage by StandardToggleMap, will be scoped to "toggles/$libraryName".
Create a ToggleMap out of the given ToggleMaps.
Create a ToggleMap out of the given ToggleMaps.
If toggleMaps
is empty, NullToggleMap will be returned.