Klasse OperationalModeService
java.lang.Object
de.delinkedde.areashopreborn.application.OperationalModeService
Maintains the session-local writable or degraded read-only operating mode.
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic enumAvailable runtime modes.static final recordImmutable current mode. -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungenterReadOnly(String reason) Enters read-only mode.booleanChecks whether business mutations are currently permitted.voidRejects a business mutation while preserving query availability.restoreNormal(String reason) Restores normal operation after an administrator has verified dependencies.snapshot()Returns the current immutable state.
-
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:
truein 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
Enters read-only mode. Repeated trips retain the original diagnostic cause.- Parameter:
reason- operator-facing cause- Gibt zurück:
- resulting state
-
restoreNormal
Restores normal operation after an administrator has verified dependencies.- Parameter:
reason- operator-facing recovery note- Gibt zurück:
- new normal state
-