Class SplitterBase<Input, ChildInput>

java.lang.Object
org.chenile.orchestrator.process.utils.base.SplitterBase<Input, ChildInput>
All Implemented Interfaces:
IWorker<Input>

public abstract class SplitterBase<Input, ChildInput> extends Object implements IWorker<Input>
  • Field Details

  • Constructor Details

    • SplitterBase

      public SplitterBase()
  • Method Details

    • start

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

      protected abstract List<SubProcessPayload> doStart(WorkerDto workerDto, Input input)
      Implementations can call processManagerClient.splitPartiallyDone(workerDto.process.getId(), batchPayload); as many times as required. This would keep starting the other processes. Or else, it can return all the accumulated processes in one shot and they will be sent to the process manager along with Split Done event.
      Parameters:
      workerDto - - The DTO
      input - - Input
      Returns:
      the list of sub process payloads.
    • splitPartiallyDone

      protected void splitPartiallyDone(String id, List<SubProcessPayload> subProcessPayloads)
    • progressUpdate

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

      protected SubProcessPayload makeSubProcessPayload(ChildInput child, String childProcessType)