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
-
Method Summary
Modifier and TypeMethodDescriptionaddCallback
(InvocationContext ctx, VisitableCommand command, InvocationCallback function) After the current stage completes, invokefunction
and return its result.andExceptionally
(InvocationContext ctx, VisitableCommand command, InvocationExceptionFunction function) After the current stage completes exceptionally, invokefunction
and 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, invokefunction
and return its result.get()
Wait for the invocation to complete and return its value.boolean
isDone()
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, invokefunction
and return its result.thenReturn
(InvocationContext ctx, VisitableCommand command, Object returnValue) Overrides the return value of thisInvocationStage
if it is completed successfully.CompletableFuture
conversion.Methods inherited from class org.infinispan.interceptors.InvocationStage
andExceptionallyMakeStage, andFinallyMakeStage, andHandleMakeStage, completedNullStage, makeStage, thenAcceptMakeStage, thenApplyMakeStage
-
Constructor Details
-
ExceptionSyncInvocationStage
-
-
Method Details
-
thenApply
public Object thenApply(InvocationContext ctx, VisitableCommand command, InvocationSuccessFunction function) Description copied from class:InvocationStage
After the current stage completes successfully, invokefunction
and return its result.The result may be either a plain value,
this
, or a newInvocationStage
. Iffunction
throws an exception, the resultInvocationStage
will complete with the same exception.- Overrides:
thenApply
in classInvocationStage
-
thenAccept
public Object thenAccept(InvocationContext ctx, VisitableCommand command, InvocationSuccessAction function) Description copied from class:InvocationStage
After the current stage completes successfully, invokeaction
.The result may be either a plain value,
this
, or a newInvocationStage
. Ifaction
throws an exception, the resultInvocationStage
will complete with the same exception.- Overrides:
thenAccept
in classInvocationStage
-
andExceptionally
public Object andExceptionally(InvocationContext ctx, VisitableCommand command, InvocationExceptionFunction function) Description copied from class:InvocationStage
After the current stage completes exceptionally, invokefunction
and return its result.The result may be either a plain value,
this
, or a newInvocationStage
. Iffunction
throws an exception, the resultInvocationStage
will complete with the same exception.- Overrides:
andExceptionally
in classInvocationStage
-
andFinally
public Object andFinally(InvocationContext ctx, VisitableCommand command, InvocationFinallyAction action) Description copied from class:InvocationStage
After the current stage completes, invokeaction
.The result may be either a plain value,
this
, or a newInvocationStage
. Ifaction
throws an exception, the resultInvocationStage
will complete with the same exception.- Overrides:
andFinally
in classInvocationStage
-
andHandle
public Object andHandle(InvocationContext ctx, VisitableCommand command, InvocationFinallyFunction function) Description copied from class:InvocationStage
After the current stage completes, invokefunction
and return its result.The result may be either a plain value,
this
, or a newInvocationStage
. Iffunction
throws an exception, the resultInvocationStage
will complete with the same exception.- Overrides:
andHandle
in classInvocationStage
-
thenReturn
Description copied from class:InvocationStage
Overrides the return value of thisInvocationStage
if it is completed successfully. The result may be eitherrv
, a newInvocationStage
orthis
- Overrides:
thenReturn
in classInvocationStage
-
get
Description copied from class:InvocationStage
Wait for the invocation to complete and return its value.- Specified by:
get
in classInvocationStage
- Throws:
Throwable
- Any exception raised during the invocation.
-
isDone
public boolean isDone()- Specified by:
isDone
in classInvocationStage
- Returns:
true
if the invocation is complete.
-
toCompletableFuture
Description copied from class:InvocationStage
CompletableFuture
conversion.- Specified by:
toCompletableFuture
in classInvocationStage
-
addCallback
public Object addCallback(InvocationContext ctx, VisitableCommand command, InvocationCallback function) Description copied from class:InvocationStage
After the current stage completes, invokefunction
and return its result.The result may be either a plain value, or a new
InvocationStage
. Iffunction
throws an exception, the resultInvocationStage
will complete with the same exception.- Specified by:
addCallback
in classInvocationStage
-