public class ParallelFlow extends Object
ParallelFlow
requires a ExecutorService to execute work units in parallel using multiple
threads.
It is the responsibility of the caller to manage the lifecycle of the
executor service.
The status of a parallel flow execution is defined as:
WorkStatus.COMPLETED: If all work units have successfully completedWorkStatus.FAILED: If one of the work units has failed| Modifier and Type | Class and Description |
|---|---|
static class |
ParallelFlow.Builder |
| Modifier and Type | Method and Description |
|---|---|
ParallelFlowReport |
execute(WorkContext workContext)
Execute the unit of work and return its report.
|
String |
getName()
The name of the unit of work.
|
public ParallelFlowReport execute(WorkContext workContext)
WorkReport instance
with a status of WorkStatus.FAILED and a reference to the exception.workContext - context in which this unit of work is being executedCopyright © 2020. All rights reserved.