Class AggregatorBase<Input, Output, ChildOutput>

java.lang.Object
org.chenile.orchestrator.process.utils.base.AggregatorBase<Input, Output, ChildOutput>
Type Parameters:
Input - - The process.input
Output - - The process.output
All Implemented Interfaces:
IWorker<Input>

public abstract class AggregatorBase<Input, Output, ChildOutput> extends Object implements IWorker<Input>
Unify all the children's outputs and make one consolidated output for the current process
  • Field Details

  • Constructor Details

    • AggregatorBase

      public AggregatorBase()
  • Method Details

    • start

      public void start(WorkerDto workerDto, Input input)
      Specified by:
      start in interface IWorker<Input>
    • progressUpdate

      protected void progressUpdate(String processId, int percent)
    • doStart

      protected abstract Output doStart(Output out, Input input, ChildOutput childOutput, WorkerDto workerDto, Process childProcess)
      This would be called once for each child process to create and progressively enhance the output from childOutput. In the first invocation, the out param below will be null. In subsequent invocations, the previous out is passed to this function.
      Parameters:
      out - - the output of the aggregation.
      input - - the input of this process
      childOutput - - the child output of the current child
      workerDto - - the worker DTO that was passed for the current process.
      childProcess - - the process descriptor for the child process
      Returns: