接口 StepExecutionSplitter
public interface StepExecutionSplitter
Strategy interface for generating input contexts for a partitioned step execution independent from the fabric they are going to run on.- 从以下版本开始:
- 2.0
- 作者:
- Dave Syer
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 java.lang.String
getStepName()
The name of the step configuration that will be executed remotely.java.util.Set<StepExecution>
split(StepExecution stepExecution, int gridSize)
Partition the providedStepExecution
into a set of parallel executable instances with the same parentJobExecution
.
方法详细资料
getStepName
java.lang.String getStepName()
The name of the step configuration that will be executed remotely. Remote workers are going to execute a the same step for each execution context in the partition.- 返回:
- the name of the step that will execute the business logic
split
java.util.Set<StepExecution> split(StepExecution stepExecution, int gridSize) throws JobExecutionException
Partition the providedStepExecution
into a set of parallel executable instances with the same parentJobExecution
. The grid size will be treated as a hint for the size of the collection to be returned. It may or may not correspond to the physical size of an execution grid.
On a restart clients of theStepExecutionSplitter
should expect it to reconstitute the state of the last failed execution and only return those executions that need to be restarted. Thus the grid size hint will be ignored on a restart.- 参数:
stepExecution
- theStepExecution
to be partitioned.gridSize
- a hint for the splitter if the size of the grid is known- 返回:
- a set of
StepExecution
instances for remote processing - 抛出:
JobExecutionException
- if the split cannot be made