Class CrashRecoveryConfig

java.lang.Object
com.hypixel.hytale.server.core.config.CrashRecoveryConfig

public class CrashRecoveryConfig extends Object
Configuration for how the server recovers when a world thread crashes.

Unset fields fall back to computed defaults. The resolution of the crash mode itself depends on whether the crashed world is the default world.

  • Field Details

    • DEFAULT_MAX_ATTEMPTS

      public static final int DEFAULT_MAX_ATTEMPTS
      Default number of reload attempts before the fallback runs.
      See Also:
    • DEFAULT_RETRY_DELAY_SECONDS

      public static final int DEFAULT_RETRY_DELAY_SECONDS
      Default delay in seconds before a reload attempt.
      See Also:
    • DEFAULT_FALLBACK

      public static final WorldCrashRecovery DEFAULT_FALLBACK
      Default action after the reload attempts run out.
    • MAX_ATTEMPTS_LIMIT

      public static final int MAX_ATTEMPTS_LIMIT
      Upper bound on the configured reload attempt count.
      See Also:
    • RETRY_DELAY_SECONDS_LIMIT

      public static final int RETRY_DELAY_SECONDS_LIMIT
      Upper bound in seconds on the configured reload delay.
      See Also:
    • CODEC

      @Nonnull public static final Codec<CrashRecoveryConfig> CODEC
  • Constructor Details

    • CrashRecoveryConfig

      public CrashRecoveryConfig()
  • Method Details

    • getMode

      @Nullable public WorldCrashRecovery getMode()
      Returns:
      the configured crash mode, or null if unset.
    • getMaxAttempts

      public int getMaxAttempts()
      Returns:
      the configured reload attempt count, or DEFAULT_MAX_ATTEMPTS if unset.
    • getRetryDelaySeconds

      public int getRetryDelaySeconds()
      Returns:
      the configured reload delay in seconds, or DEFAULT_RETRY_DELAY_SECONDS if unset.
    • getFallback

      @Nonnull public WorldCrashRecovery getFallback()
      Returns:
      the configured fallback action, or DEFAULT_FALLBACK if unset.