Class LiveConfigSnapshot

java.lang.Object
com.hypixel.hytale.server.core.liveconfig.LiveConfigSnapshot

public final class LiveConfigSnapshot extends Object
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.

  • Field Details

    • EMPTY

      public static final LiveConfigSnapshot EMPTY
      Empty snapshot used before the first successful fetch and in singleplayer mode. All flag reads return the caller-provided default.
  • Constructor Details

  • Method Details

    • getBoolFlag

      public boolean getBoolFlag(@Nonnull String name, boolean defaultValue)
    • getIntFlag

      public int getIntFlag(@Nonnull String name, int defaultValue)
    • getStringFlag

      @Nonnull public String getStringFlag(@Nonnull String name, @Nonnull String defaultValue)
    • hasFlag

      public boolean hasFlag(@Nonnull String name)
    • getVersion

      @Nullable public String getVersion()
    • getEtag

      @Nullable public String getEtag()
    • getFlagCount

      public int getFlagCount()
    • getAllFlags

      @Nonnull public Map<String, LiveConfigSnapshot.ResolvedFlag> getAllFlags()