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:
  1. Commands are expected to throw ErrorNumException in case of errors. These errors are logged in the context as warnings
  2. 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>

public class ParallelChain<InputType> extends Chain<InputType>
Author:
Raja Shankar Kolluru
  • Field Details

    • executorService

      private ExecutorService executorService
    • timeoutInMillis

      private long timeoutInMillis
  • Constructor Details

    • ParallelChain

      public ParallelChain()
    • ParallelChain

      public ParallelChain(ExecutorService service, int timeoutInMillis)
  • Method Details