Class ExceptionSyncInvocationStage
InvocationStage for Throwable.
It is similar to SyncInvocationStage but instead of being used with a successful value, it accepts a Throwable
- Since:
- 10.0
- Author:
- Pedro Ruivo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddCallback(InvocationContext ctx, VisitableCommand command, InvocationCallback function) After the current stage completes, invokefunctionand return its result.andExceptionally(InvocationContext ctx, VisitableCommand command, InvocationExceptionFunction function) After the current stage completes exceptionally, invokefunctionand return its result.andFinally(InvocationContext ctx, VisitableCommand command, InvocationFinallyAction action) After the current stage completes, invokeaction.andHandle(InvocationContext ctx, VisitableCommand command, InvocationFinallyFunction function) After the current stage completes, invokefunctionand return its result.get()Wait for the invocation to complete and return its value.booleanisDone()thenAccept(InvocationContext ctx, VisitableCommand command, InvocationSuccessAction function) After the current stage completes successfully, invokeaction.thenApply(InvocationContext ctx, VisitableCommand command, InvocationSuccessFunction function) After the current stage completes successfully, invokefunctionand return its result.thenReturn(InvocationContext ctx, VisitableCommand command, Object returnValue) Overrides the return value of thisInvocationStageif it is completed successfully.CompletableFutureconversion.Methods inherited from class org.infinispan.interceptors.InvocationStage
andExceptionallyMakeStage, andFinallyMakeStage, andHandleMakeStage, completedFalseStage, completedNullStage, completedTrueStage, makeStage, thenAcceptMakeStage, thenApplyMakeStage
-
Constructor Details
-
ExceptionSyncInvocationStage
-
-
Method Details
-
thenApply
public Object thenApply(InvocationContext ctx, VisitableCommand command, InvocationSuccessFunction function) Description copied from class:InvocationStageAfter the current stage completes successfully, invokefunctionand return its result.The result may be either a plain value,
this, or a newInvocationStage. Iffunctionthrows an exception, the resultInvocationStagewill complete with the same exception.- Overrides:
thenApplyin classInvocationStage
-
thenAccept
public Object thenAccept(InvocationContext ctx, VisitableCommand command, InvocationSuccessAction function) Description copied from class:InvocationStageAfter the current stage completes successfully, invokeaction.The result may be either a plain value,
this, or a newInvocationStage. Ifactionthrows an exception, the resultInvocationStagewill complete with the same exception.- Overrides:
thenAcceptin classInvocationStage
-
andExceptionally
public Object andExceptionally(InvocationContext ctx, VisitableCommand command, InvocationExceptionFunction function) Description copied from class:InvocationStageAfter the current stage completes exceptionally, invokefunctionand return its result.The result may be either a plain value,
this, or a newInvocationStage. Iffunctionthrows an exception, the resultInvocationStagewill complete with the same exception.- Overrides:
andExceptionallyin classInvocationStage
-
andFinally
public Object andFinally(InvocationContext ctx, VisitableCommand command, InvocationFinallyAction action) Description copied from class:InvocationStageAfter the current stage completes, invokeaction.The result may be either a plain value,
this, or a newInvocationStage. Ifactionthrows an exception, the resultInvocationStagewill complete with the same exception.- Overrides:
andFinallyin classInvocationStage
-
andHandle
public Object andHandle(InvocationContext ctx, VisitableCommand command, InvocationFinallyFunction function) Description copied from class:InvocationStageAfter the current stage completes, invokefunctionand return its result.The result may be either a plain value,
this, or a newInvocationStage. Iffunctionthrows an exception, the resultInvocationStagewill complete with the same exception.- Overrides:
andHandlein classInvocationStage
-
thenReturn
Description copied from class:InvocationStageOverrides the return value of thisInvocationStageif it is completed successfully. The result may be eitherrv, a newInvocationStageorthis- Overrides:
thenReturnin classInvocationStage
-
get
Description copied from class:InvocationStageWait for the invocation to complete and return its value.- Specified by:
getin classInvocationStage- Throws:
Throwable- Any exception raised during the invocation.
-
isDone
public boolean isDone()- Specified by:
isDonein classInvocationStage- Returns:
trueif the invocation is complete.
-
toCompletableFuture
Description copied from class:InvocationStageCompletableFutureconversion.- Specified by:
toCompletableFuturein classInvocationStage
-
addCallback
public Object addCallback(InvocationContext ctx, VisitableCommand command, InvocationCallback function) Description copied from class:InvocationStageAfter the current stage completes, invokefunctionand return its result.The result may be either a plain value, or a new
InvocationStage. Iffunctionthrows an exception, the resultInvocationStagewill complete with the same exception.- Specified by:
addCallbackin classInvocationStage
-