Package org.infinispan.interceptors.impl
Class MultiSubCommandInvoker
java.lang.Object
org.infinispan.interceptors.impl.MultiSubCommandInvoker
- All Implemented Interfaces:
InvocationCallback<VisitableCommand>,InvocationSuccessFunction<VisitableCommand>
public class MultiSubCommandInvoker
extends Object
implements InvocationSuccessFunction<VisitableCommand>
Invoke a sequence of sub-commands.
- Since:
- 9.0
- Author:
- Dan Berindei
-
Method Summary
Modifier and TypeMethodDescriptionapply(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 ObjectinvokeEach(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, waitMethods inherited from interface org.infinispan.interceptors.InvocationSuccessFunction
apply
-
Method Details
-
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. IffinalStagehas and exception, skip all the sub-commands and just return thefinalStage. -
apply
Description copied from interface:InvocationSuccessFunctionProcess the result from a successful invocation stage and either return a simple value, return a newInvocationStage, or throw an exception.- Specified by:
applyin interfaceInvocationSuccessFunction<VisitableCommand>- Throws:
Throwable
-