类 PartitionStep
- java.lang.Object
- org.springframework.batch.core.step.AbstractStep
- org.springframework.batch.core.partition.support.PartitionStep
- 所有已实现的接口:
Step
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanNameAware
,org.springframework.beans.factory.InitializingBean
- 直接已知子类:
PartitionStep
public class PartitionStep extends AbstractStep
Implementation ofStep
which partitions the execution and spreads the load using aPartitionHandler
.- 从以下版本开始:
- 2.0
- 作者:
- Dave Syer
字段概要
从接口继承的字段 org.springframework.batch.core.Step
STEP_TYPE_KEY
构造器概要
构造器 构造器 说明 PartitionStep()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
afterPropertiesSet()
Assert that mandatory properties are set (stepExecutionSplitter, partitionHandler) and delegate top superclass.protected void
doExecute(StepExecution stepExecution)
Delegate execution to thePartitionHandler
provided.protected PartitionHandler
getPartitionHandler()
protected StepExecutionSplitter
getStepExecutionSplitter()
void
setPartitionHandler(PartitionHandler partitionHandler)
APartitionHandler
which can send out step executions for remote processing and bring back the results.void
setStepExecutionAggregator(StepExecutionAggregator stepExecutionAggregator)
AStepExecutionAggregator
that can aggregate step executions when they come back from the handler.void
setStepExecutionSplitter(StepExecutionSplitter stepExecutionSplitter)
Public setter for mandatory propertyStepExecutionSplitter
.从类继承的方法 org.springframework.batch.core.step.AbstractStep
close, doExecutionRegistration, doExecutionRelease, execute, getCompositeListener, getJobRepository, getName, getStartLimit, isAllowStartIfComplete, open, registerStepExecutionListener, setAllowStartIfComplete, setBeanName, setJobRepository, setName, setStartLimit, setStepExecutionListeners, toString
构造器详细资料
PartitionStep
public PartitionStep()
方法详细资料
setPartitionHandler
public void setPartitionHandler(PartitionHandler partitionHandler)
APartitionHandler
which can send out step executions for remote processing and bring back the results.- 参数:
partitionHandler
- thePartitionHandler
to set
setStepExecutionAggregator
public void setStepExecutionAggregator(StepExecutionAggregator stepExecutionAggregator)
AStepExecutionAggregator
that can aggregate step executions when they come back from the handler. Defaults to aDefaultStepExecutionAggregator
.- 参数:
stepExecutionAggregator
- theStepExecutionAggregator
to set
setStepExecutionSplitter
public void setStepExecutionSplitter(StepExecutionSplitter stepExecutionSplitter)
Public setter for mandatory propertyStepExecutionSplitter
.- 参数:
stepExecutionSplitter
- theStepExecutionSplitter
to set
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception
Assert that mandatory properties are set (stepExecutionSplitter, partitionHandler) and delegate top superclass.- 指定者:
afterPropertiesSet
在接口中org.springframework.beans.factory.InitializingBean
- 覆盖:
afterPropertiesSet
在类中AbstractStep
- 抛出:
java.lang.Exception
- 另请参阅:
AbstractStep.afterPropertiesSet()
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, summarising 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
.- 指定者:
doExecute
在类中AbstractStep
- 参数:
stepExecution
- the master step execution for the partition- 抛出:
java.lang.Exception
- checked exception thrown by implementation- 另请参阅:
Step.execute(StepExecution)
getStepExecutionSplitter
protected StepExecutionSplitter getStepExecutionSplitter()
getPartitionHandler
protected PartitionHandler getPartitionHandler()