Klasse OperationalModeService

java.lang.Object
de.delinkedde.areashopreborn.application.OperationalModeService

public final class OperationalModeService extends Object
Maintains the session-local writable or degraded read-only operating mode.
  • Konstruktordetails

    • OperationalModeService

      public OperationalModeService()
      Creates a normal session-local operating mode.
  • Methodendetails

    • snapshot

      Returns the current immutable state.
      Gibt zurück:
      current mode snapshot
    • isWritable

      public boolean isWritable()
      Checks whether business mutations are currently permitted.
      Gibt zurück:
      true in normal mode
    • requireWritable

      public void requireWritable()
      Rejects a business mutation while preserving query availability.
      Löst aus:
      ApplicationException - when the session is read-only
    • enterReadOnly

      public OperationalModeService.Snapshot enterReadOnly(String reason)
      Enters read-only mode. Repeated trips retain the original diagnostic cause.
      Parameter:
      reason - operator-facing cause
      Gibt zurück:
      resulting state
    • restoreNormal

      public OperationalModeService.Snapshot restoreNormal(String reason)
      Restores normal operation after an administrator has verified dependencies.
      Parameter:
      reason - operator-facing recovery note
      Gibt zurück:
      new normal state