Klasse OperationFailurePublisher
java.lang.Object
de.delinkedde.areashopreborn.application.OperationFailurePublisher
Normalizes asynchronous failures and publishes their safe representation on the Paper thread.
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungOperationFailurePublisher(ThreadBridge threads, OperationalModeService modes) Creates the publisher.OperationFailurePublisher(ThreadBridge threads, OperationalModeService modes, EventPublisher events) Creates a normalized failure publisher with an explicit platform event boundary. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibung<T> CompletableFuture<T> observe(CompletableFuture<T> future, UUID actorId, String operation, String target, OperationCause cause) Observes a future without changing its result or exceptional completion.voidpublishNow(UUID actorId, String operation, String target, OperationCause cause, Throwable failure) Publishes a failure immediately and must be called on Paper's server thread.
-
Konstruktordetails
-
OperationFailurePublisher
Creates the publisher.- Parameter:
threads- server-thread bridgemodes- runtime mutation gate
-
OperationFailurePublisher
public OperationFailurePublisher(ThreadBridge threads, OperationalModeService modes, EventPublisher events) Creates a normalized failure publisher with an explicit platform event boundary.- Parameter:
threads- Paper thread bridgemodes- operating mode controllerevents- synchronous platform event publisher
-
-
Methodendetails
-
observe
public <T> CompletableFuture<T> observe(CompletableFuture<T> future, UUID actorId, String operation, String target, OperationCause cause) Observes a future without changing its result or exceptional completion.- Typparameter:
T- operation result type- Parameter:
future- observed operationactorId- initiating player, ornulloperation- stable operation nametarget- optional lookup targetcause- initiating subsystem- Gibt zurück:
- the original future
-
publishNow
public void publishNow(UUID actorId, String operation, String target, OperationCause cause, Throwable failure) Publishes a failure immediately and must be called on Paper's server thread.- Parameter:
actorId- initiating player, ornulloperation- stable operation nametarget- optional lookup targetcause- initiating subsystemfailure- original failure
-