Package org.infinispan.interceptors.impl
Class MultiSubCommandInvoker
- java.lang.Object
-
- org.infinispan.interceptors.impl.MultiSubCommandInvoker
-
- All Implemented Interfaces:
InvocationCallback
,InvocationSuccessFunction
public class MultiSubCommandInvoker extends Object implements InvocationSuccessFunction
Invoke a sequence of sub-commands.- Since:
- 9.0
- Author:
- Dan Berindei
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
apply(InvocationContext rCtx, VisitableCommand rCommand, Object rv)
Process the result from a successful invocation stage and either return a simple value, return a newInvocationStage
, or throw an exception.static Object
invokeEach(InvocationContext ctx, Iterator<VisitableCommand> subCommands, BaseAsyncInterceptor interceptor, Object finalReturnValue)
CallBaseAsyncInterceptor.invokeNext(InvocationContext, VisitableCommand)
on a sequence of sub-commands.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.infinispan.interceptors.InvocationSuccessFunction
apply
-
-
-
-
Method Detail
-
invokeEach
public static Object invokeEach(InvocationContext ctx, Iterator<VisitableCommand> subCommands, BaseAsyncInterceptor interceptor, Object finalReturnValue)
CallBaseAsyncInterceptor.invokeNext(InvocationContext, VisitableCommand)
on a sequence of sub-commands.Stop when one of the sub-commands throws an exception, and return an invocation stage with that exception. If all the sub-commands are successful, return the
finalStage
. IffinalStage
has and exception, skip all the sub-commands and just return thefinalStage
.
-
apply
public Object apply(InvocationContext rCtx, VisitableCommand rCommand, Object rv) throws Throwable
Description copied from interface:InvocationSuccessFunction
Process the result from a successful invocation stage and either return a simple value, return a newInvocationStage
, or throw an exception.- Specified by:
apply
in interfaceInvocationSuccessFunction
- Throws:
Throwable
-
-