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
-
Field Summary
Fields inherited from class org.chenile.owiz.impl.Chain
commandDescSet, currentIndex, INDEX
Fields inherited from class org.chenile.owiz.impl.CommandBase
commandDescriptor, orchConfigurator
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
commandCanBeBypassed
(Command<InputType> cmd, InputType context) protected void
protected ErrorNumException
generateOverallException
(String message) protected void
handleErrors
(InputType context, Throwable cause) protected ResponseMessage
handleNonErrorNumExceptions
(InputType context, Throwable cause) void
setExecutorService
(ExecutorService service) void
setTimeoutInMillis
(long timeoutInMillis) Methods inherited from class org.chenile.owiz.impl.Chain
attachCommand, obtainExecutionCommands, shouldStopChain
Methods 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