Interface PartitionHandler
- All Known Implementing Classes:
AbstractPartitionHandler
,MessageChannelPartitionHandler
,TaskExecutorPartitionHandler
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Interface defining the responsibilities of controlling the execution of a partitioned
StepExecution
. Implementations will need to create a partition with the
StepExecutionSplitter
, and then use an execution fabric (grid, etc.), to
execute the partitioned step. The results of the executions can be returned raw from
remote workers to be aggregated by the caller.- Since:
- 2.0
- Author:
- Dave Syer, Mahmoud Ben Hassine, Taeik Lim
-
Method Summary
Modifier and TypeMethodDescriptionhandle
(StepExecutionSplitter stepSplitter, StepExecution stepExecution) Main entry point forPartitionHandler
interface.
-
Method Details
-
handle
Collection<StepExecution> handle(StepExecutionSplitter stepSplitter, StepExecution stepExecution) throws Exception Main entry point forPartitionHandler
interface. The splitter creates all the executions that need to be farmed out, along with their input parameters (in the form of theirExecutionContext
). The manager step execution is used to identify the partition and group together the results logically.- Parameters:
stepSplitter
- a strategy for generating a collection ofStepExecution
instancesstepExecution
- the manager step execution for the whole partition- Returns:
- a collection of completed
StepExecution
instances - Throws:
Exception
- if anything goes wrong. This allows implementations to be liberal and rely on the caller to translate an exception into a step failure as necessary.
-