Package org.chenile.owiz.impl
Class ParallelChain<InputType>
java.lang.Object
org.chenile.owiz.impl.CommandBase<InputType>
org.chenile.owiz.impl.Chain<InputType>
org.chenile.owiz.impl.ParallelChain<InputType>
- Type Parameters:
InputType-
Extends normal chain functionality and handles parallel processing. Individual commands are assumed to be thread safe i.e. they mutate context (the InputType) in different threads in a concurrent way. It is also assumed that the context is WarningAware so that all the errors are captured as warnings. Exception processing:- Commands are expected to throw ErrorNumException in case of errors. These errors are logged in the context as warnings
- Framework throws ErrorNumException (error code 903). This error will not be logged as a warning (because the sub command has already been logged and this will be redundant)
- All Implemented Interfaces:
AttachableCommand<InputType>,BypassableCommand<InputType>,Command<InputType>,OrchestrationAware<InputType>
- Author:
- Raja Shankar Kolluru
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class org.chenile.owiz.impl.Chain
commandDescSet, currentIndex, INDEXFields inherited from class org.chenile.owiz.impl.CommandBase
commandDescriptor, orchConfigurator -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancommandCanBeBypassed(Command<InputType> cmd, InputType context) protected voidprotected ErrorNumExceptiongenerateOverallException(String message) protected voidhandleErrors(InputType context, Throwable cause) protected ResponseMessagehandleNonErrorNumExceptions(InputType context, Throwable cause) voidsetExecutorService(ExecutorService service) voidsetTimeoutInMillis(long timeoutInMillis) Methods inherited from class org.chenile.owiz.impl.Chain
attachCommand, obtainExecutionCommands, shouldStopChainMethods inherited from class org.chenile.owiz.impl.CommandBase
bypass, execute, getConfigValue, getId, getParentId, obtainCommand, postprocess, preprocess, setCommandDescriptor, setOrchConfigurator
-
Field Details
-
executorService
-
timeoutInMillis
private long timeoutInMillis
-
-
Constructor Details
-
ParallelChain
public ParallelChain() -
ParallelChain
-
-
Method Details