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(java.lang.Object rv)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <C extends org.infinispan.commands.VisitableCommand>
java.lang.ObjectaddCallback(InvocationContext ctx, C command, InvocationCallback<C> function)After the current stage completes, invokefunctionand return its result.<C extends org.infinispan.commands.VisitableCommand>
java.lang.ObjectandExceptionally(InvocationContext ctx, C command, InvocationExceptionFunction<C> function)After the current stage completes exceptionally, invokefunctionand return its result.<C extends org.infinispan.commands.VisitableCommand>
InvocationStageandExceptionallyMakeStage(InvocationContext ctx, C command, InvocationExceptionFunction<C> function)After the current stage completes exceptionally, invokefunctionand return its result.<C extends org.infinispan.commands.VisitableCommand>
java.lang.ObjectandFinally(InvocationContext ctx, C command, InvocationFinallyAction<C> action)After the current stage completes, invokeaction.<C extends org.infinispan.commands.VisitableCommand>
InvocationStageandFinallyMakeStage(InvocationContext ctx, C command, InvocationFinallyAction<C> action)After the current stage completes, invokeaction.<C extends org.infinispan.commands.VisitableCommand>
java.lang.ObjectandHandle(InvocationContext ctx, C command, InvocationFinallyFunction<C> function)After the current stage completes, invokefunctionand return its result.<C extends org.infinispan.commands.VisitableCommand>
InvocationStageandHandleMakeStage(InvocationContext ctx, C command, InvocationFinallyFunction<C> function)After the current stage completes, invokefunctionand return its result.java.lang.Objectget()Wait for the invocation to complete and return its value.booleanisDone()<C extends org.infinispan.commands.VisitableCommand>
java.lang.ObjectthenAccept(InvocationContext ctx, C command, InvocationSuccessAction<C> action)After the current stage completes successfully, invokeaction.<C extends org.infinispan.commands.VisitableCommand>
InvocationStagethenAcceptMakeStage(InvocationContext ctx, C command, InvocationSuccessAction<C> action)After the current stage completes successfully, invokeaction.<C extends org.infinispan.commands.VisitableCommand>
java.lang.ObjectthenApply(InvocationContext ctx, C command, InvocationSuccessFunction<C> function)After the current stage completes successfully, invokefunctionand return its result.<C extends org.infinispan.commands.VisitableCommand>
InvocationStagethenApplyMakeStage(InvocationContext ctx, C command, InvocationSuccessFunction<C> function)After the current stage completes successfully, invokefunctionand return its result.java.lang.ObjectthenReturn(InvocationContext ctx, org.infinispan.commands.VisitableCommand command, java.lang.Object returnValue)Overrides the return value of thisInvocationStageif it is completed successfully.java.util.concurrent.CompletableFuture<java.lang.Object>toCompletableFuture()CompletableFutureconversion.java.lang.StringtoString()-
Methods inherited from class org.infinispan.interceptors.InvocationStage
completedNullStage, makeStage
-
-
-
-
Method Detail
-
get
public java.lang.Object get() throws java.lang.ThrowableDescription copied from class:InvocationStageWait for the invocation to complete and return its value.- Specified by:
getin classInvocationStage- Throws:
java.lang.Throwable- Any exception raised during the invocation.
-
isDone
public boolean isDone()
- Specified by:
isDonein classInvocationStage- Returns:
trueif the invocation is complete.
-
toCompletableFuture
public java.util.concurrent.CompletableFuture<java.lang.Object> toCompletableFuture()
Description copied from class:InvocationStageCompletableFutureconversion.- Specified by:
toCompletableFuturein classInvocationStage
-
thenApply
public <C extends org.infinispan.commands.VisitableCommand> java.lang.Object thenApply(InvocationContext ctx, C command, InvocationSuccessFunction<C> 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 <C extends org.infinispan.commands.VisitableCommand> java.lang.Object thenAccept(InvocationContext ctx, C command, InvocationSuccessAction<C> action)
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 <C extends org.infinispan.commands.VisitableCommand> java.lang.Object andExceptionally(InvocationContext ctx, C command, InvocationExceptionFunction<C> 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 <C extends org.infinispan.commands.VisitableCommand> java.lang.Object andFinally(InvocationContext ctx, C command, InvocationFinallyAction<C> 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 <C extends org.infinispan.commands.VisitableCommand> java.lang.Object andHandle(InvocationContext ctx, C command, InvocationFinallyFunction<C> 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
-
addCallback
public <C extends org.infinispan.commands.VisitableCommand> java.lang.Object addCallback(InvocationContext ctx, C command, InvocationCallback<C> 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
-
thenApplyMakeStage
public <C extends org.infinispan.commands.VisitableCommand> InvocationStage thenApplyMakeStage(InvocationContext ctx, C command, InvocationSuccessFunction<C> function)
After the current stage completes successfully, invokefunctionand return its result. The result may be either a plain value, or a newInvocationStage.- Overrides:
thenApplyMakeStagein classInvocationStage
-
thenAcceptMakeStage
public <C extends org.infinispan.commands.VisitableCommand> InvocationStage thenAcceptMakeStage(InvocationContext ctx, C command, InvocationSuccessAction<C> action)
Description copied from class:InvocationStageAfter the current stage completes successfully, invokeaction.The result may be either
this, or a newInvocationStage. Ifactionthrows an exception, the resultInvocationStagewill complete with the same exception.- Overrides:
thenAcceptMakeStagein classInvocationStage
-
andExceptionallyMakeStage
public <C extends org.infinispan.commands.VisitableCommand> InvocationStage andExceptionallyMakeStage(InvocationContext ctx, C command, InvocationExceptionFunction<C> function)
Description copied from class:InvocationStageAfter the current stage completes exceptionally, invokefunctionand return its result.The result may be either
this, or a newInvocationStage. Iffunctionthrows an exception, the resultInvocationStagewill complete with the same exception.- Overrides:
andExceptionallyMakeStagein classInvocationStage
-
andFinallyMakeStage
public <C extends org.infinispan.commands.VisitableCommand> InvocationStage andFinallyMakeStage(InvocationContext ctx, C command, InvocationFinallyAction<C> action)
Description copied from class:InvocationStageAfter the current stage completes, invokeaction.The result may be either
this, or a newInvocationStage. Ifactionthrows an exception, the resultInvocationStagewill complete with the same exception.- Overrides:
andFinallyMakeStagein classInvocationStage
-
andHandleMakeStage
public <C extends org.infinispan.commands.VisitableCommand> InvocationStage andHandleMakeStage(InvocationContext ctx, C command, InvocationFinallyFunction<C> function)
Description copied from class:InvocationStageAfter the current stage completes, invokefunctionand return its result.The result may be either
this, or a newInvocationStage. Iffunctionthrows an exception, the resultInvocationStagewill complete with the same exception.- Overrides:
andHandleMakeStagein classInvocationStage
-
thenReturn
public java.lang.Object thenReturn(InvocationContext ctx, org.infinispan.commands.VisitableCommand command, java.lang.Object returnValue)
Description copied from class:InvocationStageOverrides the return value of thisInvocationStageif it is completed successfully. The result may be eitherrv, a newInvocationStageorthis- Overrides:
thenReturnin classInvocationStage
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-