Class SplitterBase<Input, ChildInput>
java.lang.Object
org.chenile.orchestrator.process.utils.base.SplitterBase<Input, ChildInput>
- All Implemented Interfaces:
IWorker<Input>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.Loggerprivate final ObjectMapper(package private) ProcessManagerClient -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract List<SubProcessPayload> Implementations can callsplitPartiallyDone(String, List)as many times as required.protected SubProcessPayloadmakeSubProcessPayload(ChildInput child, String childProcessType) protected voidprogressUpdate(String processId, int percent) protected voidsplitPartiallyDone(String id, List<SubProcessPayload> subProcessPayloads) void
-
Field Details
-
logger
private final org.slf4j.Logger logger -
processManagerClient
-
objectMapper
-
-
Constructor Details
-
SplitterBase
public SplitterBase()
-
-
Method Details
-
start
-
doStart
Implementations can callsplitPartiallyDone(String, List)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. Also leveragemakeSubProcessPayload(Object, String)for making a sub process payload for each of the sub processes that are required to be generated for the current process.- Parameters:
workerDto- - The DTOinput- - Input- Returns:
- the list of sub process payloads.
-
splitPartiallyDone
-
progressUpdate
-
makeSubProcessPayload
-
CHENILE