|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.batch.core.partition.support.SimpleStepExecutionSplitter
public class SimpleStepExecutionSplitter
Generic implementation of StepExecutionSplitter
that delegates to a
Partitioner
to generate ExecutionContext
instances. Takes
care of restartability and identifying the step executions from previous runs
of the same job. The generated StepExecution
instances have names
that identify them uniquely in the partition. The name is constructed from a
base (name of the target step) plus a suffix taken from the
Partitioner
identifiers, separated by a colon, e.g.
{step1:partition0, step1:partition1, ...}
.
Constructor Summary | |
---|---|
SimpleStepExecutionSplitter(JobRepository jobRepository,
Step step)
|
|
SimpleStepExecutionSplitter(JobRepository jobRepository,
Step step,
Partitioner partitioner)
Construct a SimpleStepExecutionSplitter from its mandatory
properties. |
Method Summary | |
---|---|
String |
getStepName()
The name of the step configuration that will be executed remotely. |
Set<StepExecution> |
split(StepExecution stepExecution,
int gridSize)
Partition the provided StepExecution into a set of parallel
executable instances with the same parent JobExecution . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleStepExecutionSplitter(JobRepository jobRepository, Step step)
public SimpleStepExecutionSplitter(JobRepository jobRepository, Step step, Partitioner partitioner)
SimpleStepExecutionSplitter
from its mandatory
properties.
jobRepository
- the JobRepository
step
- the target step (a local version of it)partitioner
- a Partitioner
to use for generating input
parametersMethod Detail |
---|
public String getStepName()
StepExecutionSplitter
getStepName
in interface StepExecutionSplitter
StepExecutionSplitter.getStepName()
public Set<StepExecution> split(StepExecution stepExecution, int gridSize) throws JobExecutionException
StepExecutionSplitter
StepExecution
into a set of parallel
executable instances with the same parent JobExecution
. 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.StepExecutionSplitter
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.
split
in interface StepExecutionSplitter
stepExecution
- the StepExecution
to be partitioned.gridSize
- a hint for the splitter if the size of the grid is known
StepExecution
instances for remote processing
JobExecutionException
- if the split cannot be madeStepExecutionSplitter.split(StepExecution, int)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |