public class PartitionStep extends AbstractStep
Step
which partitions the execution and spreads the
load using a PartitionHandler
.STEP_TYPE_KEY
Constructor and Description |
---|
PartitionStep() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet()
Assert that mandatory properties are set (stepExecutionSplitter,
partitionHandler) and delegate top superclass.
|
protected void |
doExecute(StepExecution stepExecution)
Delegate execution to the
PartitionHandler provided. |
protected PartitionHandler |
getPartitionHandler() |
protected StepExecutionSplitter |
getStepExecutionSplitter() |
void |
setPartitionHandler(PartitionHandler partitionHandler)
A
PartitionHandler which can send out step executions for remote
processing and bring back the results. |
void |
setStepExecutionAggregator(StepExecutionAggregator stepExecutionAggregator)
A
StepExecutionAggregator that can aggregate step executions when
they come back from the handler. |
void |
setStepExecutionSplitter(StepExecutionSplitter stepExecutionSplitter)
Public setter for mandatory property
StepExecutionSplitter . |
close, doExecutionRegistration, doExecutionRelease, execute, getCompositeListener, getJobRepository, getName, getStartLimit, isAllowStartIfComplete, open, registerStepExecutionListener, setAllowStartIfComplete, setBeanName, setJobRepository, setName, setStartLimit, setStepExecutionListeners, toString
public void setPartitionHandler(PartitionHandler partitionHandler)
PartitionHandler
which can send out step executions for remote
processing and bring back the results.partitionHandler
- the PartitionHandler
to setpublic void setStepExecutionAggregator(StepExecutionAggregator stepExecutionAggregator)
StepExecutionAggregator
that can aggregate step executions when
they come back from the handler. Defaults to a
DefaultStepExecutionAggregator
.stepExecutionAggregator
- the StepExecutionAggregator
to setpublic void setStepExecutionSplitter(StepExecutionSplitter stepExecutionSplitter)
StepExecutionSplitter
.stepExecutionSplitter
- the StepExecutionSplitter
to setpublic void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
afterPropertiesSet
in class AbstractStep
java.lang.Exception
AbstractStep.afterPropertiesSet()
protected void doExecute(StepExecution stepExecution) throws java.lang.Exception
PartitionHandler
provided. The
StepExecution
passed in here becomes the parent or master
execution for the partition, summarising the status on exit of the
logical grouping of work carried out by the PartitionHandler
. The
individual step executions and their input parameters (through
ExecutionContext
) for the partition elements are provided by the
StepExecutionSplitter
.doExecute
in class AbstractStep
stepExecution
- the master step execution for the partitionjava.lang.Exception
Step.execute(StepExecution)
protected StepExecutionSplitter getStepExecutionSplitter()
protected PartitionHandler getPartitionHandler()