org.springframework.batch.core.partition.support
Class PartitionStep
java.lang.Object
org.springframework.batch.core.step.AbstractStep
org.springframework.batch.core.partition.support.PartitionStep
- All Implemented Interfaces:
- Step, BeanNameAware, InitializingBean
public class PartitionStep
- extends AbstractStep
Implementation of Step
which partitions the execution and spreads the
load using a PartitionHandler
.
- Since:
- 2.0
- Author:
- Dave Syer
Methods inherited from class org.springframework.batch.core.step.AbstractStep |
close, execute, getCompositeListener, getJobRepository, getName, getStartLimit, isAllowStartIfComplete, open, registerStepExecutionListener, setAllowStartIfComplete, setBeanName, setJobRepository, setName, setStartLimit, setStepExecutionListeners, toString |
PartitionStep
public PartitionStep()
setPartitionHandler
public void setPartitionHandler(PartitionHandler partitionHandler)
- Public setter for mandatory property
PartitionHandler
.
- Parameters:
partitionHandler
- the PartitionHandler
to set
setStepExecutionSplitter
public void setStepExecutionSplitter(StepExecutionSplitter stepExecutionSplitter)
- Public setter for mandatory property
StepExecutionSplitter
.
- Parameters:
stepExecutionSplitter
- the StepExecutionSplitter
to set
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Assert that mandatory properties are set (stepExecutionSplitter,
partitionHandler) and delegate top superclass.
- Specified by:
afterPropertiesSet
in interface InitializingBean
- Overrides:
afterPropertiesSet
in class AbstractStep
- Throws:
Exception
- See Also:
AbstractStep.afterPropertiesSet()
doExecute
protected void doExecute(StepExecution stepExecution)
throws Exception
- Delegate execution to the
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
.
- Specified by:
doExecute
in class AbstractStep
- Parameters:
stepExecution
- the master step execution for the partition
- Throws:
AbstractStep.FatalException
Exception
- See Also:
Step.execute(StepExecution)
Copyright © 2009 SpringSource. All Rights Reserved.