Contents
Class LiveConfigSnapshot
java.lang.Object
com.hypixel.hytale.server.core.liveconfig.LiveConfigSnapshot
Immutable snapshot of pre-evaluated feature flags from the live config service.
All flag reads are zero-allocation lookups into an unmodifiable map.
Snapshots are swapped atomically via a volatile reference in LiveConfigModule.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA single resolved feature flag with its type and pre-evaluated value. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final LiveConfigSnapshotEmpty snapshot used before the first successful fetch and in singleplayer mode. -
Constructor Summary
ConstructorsConstructorDescriptionLiveConfigSnapshot(String version, String etag, Map<String, LiveConfigSnapshot.ResolvedFlag> flags) -
Method Summary
Modifier and TypeMethodDescriptionbooleangetBoolFlag(String name, boolean defaultValue) getEtag()intintgetIntFlag(String name, int defaultValue) getStringFlag(String name, String defaultValue) boolean
-
Field Details
-
EMPTY
Empty snapshot used before the first successful fetch and in singleplayer mode. All flag reads return the caller-provided default.
-
-
Constructor Details
-
LiveConfigSnapshot
public LiveConfigSnapshot(@Nonnull String version, @Nullable String etag, @Nonnull Map<String, LiveConfigSnapshot.ResolvedFlag> flags)
-
-
Method Details
-
getBoolFlag
-
getIntFlag
-
getStringFlag
-
hasFlag
-
getVersion
-
getEtag
-
getFlagCount
public int getFlagCount() -
getAllFlags
-