Class PartitionStep
- java.lang.Object
- org.springframework.batch.core.step.AbstractStep
- org.springframework.batch.core.partition.support.PartitionStep
- org.springframework.batch.core.jsr.step.PartitionStep
- All Implemented Interfaces:
Step
,StepLocator
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanNameAware
,org.springframework.beans.factory.InitializingBean
public class PartitionStep extends PartitionStep implements StepLocator
An extension of thePartitionStep
that provides additional semantics required by JSR-352. Specifically, this implementation adds the required lifecycle calls to thePartitionReducer
if it is used.- Since:
- 3.0
- Author:
- Michael Minella
Field Summary
Fields inherited from interface org.springframework.batch.core.Step
STEP_TYPE_KEY
Constructor Summary
Constructors Constructor Description PartitionStep()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doExecute(StepExecution stepExecution)
Delegate execution to thePartitionHandler
provided.Step
getStep(java.lang.String stepName)
java.util.Collection<java.lang.String>
getStepNames()
void
setPartitionReducer(javax.batch.api.partition.PartitionReducer reducer)
Methods inherited from class org.springframework.batch.core.partition.support.PartitionStep
afterPropertiesSet, getPartitionHandler, getStepExecutionSplitter, setPartitionHandler, setStepExecutionAggregator, setStepExecutionSplitter
Methods inherited from class org.springframework.batch.core.step.AbstractStep
close, doExecutionRegistration, doExecutionRelease, execute, getCompositeListener, getJobRepository, getName, getStartLimit, isAllowStartIfComplete, open, registerStepExecutionListener, setAllowStartIfComplete, setBeanName, setJobRepository, setName, setStartLimit, setStepExecutionListeners, toString
Method Detail
setPartitionReducer
public void setPartitionReducer(javax.batch.api.partition.PartitionReducer reducer)
doExecute
protected void doExecute(StepExecution stepExecution) throws java.lang.Exception
Delegate execution to thePartitionHandler
provided. TheStepExecution
passed in here becomes the parent or master execution for the partition, summarizing the status on exit of the logical grouping of work carried out by thePartitionHandler
. The individual step executions and their input parameters (throughExecutionContext
) for the partition elements are provided by theStepExecutionSplitter
.- Overrides:
doExecute
in classPartitionStep
- Parameters:
stepExecution
- the master step execution for the partition- Throws:
java.lang.Exception
- checked exception thrown by implementation- See Also:
Step.execute(StepExecution)
getStepNames
public java.util.Collection<java.lang.String> getStepNames()
- Specified by:
getStepNames
in interfaceStepLocator
getStep
public Step getStep(java.lang.String stepName) throws NoSuchStepException
- Specified by:
getStep
in interfaceStepLocator
- Throws:
NoSuchStepException