Class SyncInvocationStage
- java.lang.Object
-
- org.infinispan.interceptors.InvocationStage
-
- org.infinispan.interceptors.SyncInvocationStage
-
public class SyncInvocationStage extends InvocationStage
- Since:
- 9.0
- Author:
- Dan Berindei
-
-
Constructor Summary
Constructors Constructor Description SyncInvocationStage()
SyncInvocationStage(Object rv)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <C extends VisitableCommand>
ObjectaddCallback(InvocationContext ctx, C command, InvocationCallback<C> function)
After the current stage completes, invokefunction
and return its result.<C extends VisitableCommand>
ObjectandExceptionally(InvocationContext ctx, C command, InvocationExceptionFunction<C> function)
After the current stage completes exceptionally, invokefunction
and return its result.<C extends VisitableCommand>
InvocationStageandExceptionallyMakeStage(InvocationContext ctx, C command, InvocationExceptionFunction<C> function)
After the current stage completes exceptionally, invokefunction
and return its result.<C extends VisitableCommand>
ObjectandFinally(InvocationContext ctx, C command, InvocationFinallyAction<C> action)
After the current stage completes, invokeaction
.<C extends VisitableCommand>
InvocationStageandFinallyMakeStage(InvocationContext ctx, C command, InvocationFinallyAction<C> action)
After the current stage completes, invokeaction
.<C extends VisitableCommand>
ObjectandHandle(InvocationContext ctx, C command, InvocationFinallyFunction<C> function)
After the current stage completes, invokefunction
and return its result.<C extends VisitableCommand>
InvocationStageandHandleMakeStage(InvocationContext ctx, C command, InvocationFinallyFunction<C> function)
After the current stage completes, invokefunction
and return its result.Object
get()
Wait for the invocation to complete and return its value.boolean
isDone()
<C extends VisitableCommand>
ObjectthenAccept(InvocationContext ctx, C command, InvocationSuccessAction<C> action)
After the current stage completes successfully, invokeaction
.<C extends VisitableCommand>
InvocationStagethenAcceptMakeStage(InvocationContext ctx, C command, InvocationSuccessAction<C> action)
After the current stage completes successfully, invokeaction
.<C extends VisitableCommand>
ObjectthenApply(InvocationContext ctx, C command, InvocationSuccessFunction<C> function)
After the current stage completes successfully, invokefunction
and return its result.<C extends VisitableCommand>
InvocationStagethenApplyMakeStage(InvocationContext ctx, C command, InvocationSuccessFunction<C> function)
After the current stage completes successfully, invokefunction
and return its result.Object
thenReturn(InvocationContext ctx, VisitableCommand command, Object returnValue)
Overrides the return value of thisInvocationStage
if it is completed successfully.CompletableFuture<Object>
toCompletableFuture()
CompletableFuture
conversion.String
toString()
-
Methods inherited from class org.infinispan.interceptors.InvocationStage
completedNullStage, makeStage
-
-
-
-
Constructor Detail
-
SyncInvocationStage
public SyncInvocationStage(Object rv)
-
SyncInvocationStage
public SyncInvocationStage()
-
-
Method Detail
-
get
public Object get() throws Throwable
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
public CompletableFuture<Object> toCompletableFuture()
Description copied from class:InvocationStage
CompletableFuture
conversion.- Specified by:
toCompletableFuture
in classInvocationStage
-
thenApply
public <C extends VisitableCommand> Object thenApply(InvocationContext ctx, C command, InvocationSuccessFunction<C> 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 <C extends VisitableCommand> Object thenAccept(InvocationContext ctx, C command, InvocationSuccessAction<C> action)
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 <C extends VisitableCommand> Object andExceptionally(InvocationContext ctx, C command, InvocationExceptionFunction<C> 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 <C extends VisitableCommand> Object andFinally(InvocationContext ctx, C command, InvocationFinallyAction<C> 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 <C extends VisitableCommand> Object andHandle(InvocationContext ctx, C command, InvocationFinallyFunction<C> 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
-
addCallback
public <C extends VisitableCommand> Object addCallback(InvocationContext ctx, C command, InvocationCallback<C> 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
-
thenApplyMakeStage
public <C extends VisitableCommand> InvocationStage thenApplyMakeStage(InvocationContext ctx, C command, InvocationSuccessFunction<C> function)
After the current stage completes successfully, invokefunction
and return its result. The result may be either a plain value, or a newInvocationStage
.- Overrides:
thenApplyMakeStage
in classInvocationStage
-
thenAcceptMakeStage
public <C extends VisitableCommand> InvocationStage thenAcceptMakeStage(InvocationContext ctx, C command, InvocationSuccessAction<C> action)
Description copied from class:InvocationStage
After the current stage completes successfully, invokeaction
.The result may be either
this
, or a newInvocationStage
. Ifaction
throws an exception, the resultInvocationStage
will complete with the same exception.- Overrides:
thenAcceptMakeStage
in classInvocationStage
-
andExceptionallyMakeStage
public <C extends VisitableCommand> InvocationStage andExceptionallyMakeStage(InvocationContext ctx, C command, InvocationExceptionFunction<C> function)
Description copied from class:InvocationStage
After the current stage completes exceptionally, invokefunction
and return its result.The result may be either
this
, or a newInvocationStage
. Iffunction
throws an exception, the resultInvocationStage
will complete with the same exception.- Overrides:
andExceptionallyMakeStage
in classInvocationStage
-
andFinallyMakeStage
public <C extends VisitableCommand> InvocationStage andFinallyMakeStage(InvocationContext ctx, C command, InvocationFinallyAction<C> action)
Description copied from class:InvocationStage
After the current stage completes, invokeaction
.The result may be either
this
, or a newInvocationStage
. Ifaction
throws an exception, the resultInvocationStage
will complete with the same exception.- Overrides:
andFinallyMakeStage
in classInvocationStage
-
andHandleMakeStage
public <C extends VisitableCommand> InvocationStage andHandleMakeStage(InvocationContext ctx, C command, InvocationFinallyFunction<C> function)
Description copied from class:InvocationStage
After the current stage completes, invokefunction
and return its result.The result may be either
this
, or a newInvocationStage
. Iffunction
throws an exception, the resultInvocationStage
will complete with the same exception.- Overrides:
andHandleMakeStage
in classInvocationStage
-
thenReturn
public Object thenReturn(InvocationContext ctx, VisitableCommand command, Object returnValue)
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
-
-