Class SplitState
java.lang.Object
org.springframework.batch.core.job.flow.support.state.AbstractState
org.springframework.batch.core.job.flow.support.state.SplitState
- All Implemented Interfaces:
FlowHolder,State
- Since:
- 2.0
- Author:
- Dave Syer, Mahmoud Ben Hassine
-
Constructor Summary
ConstructorsConstructorDescriptionSplitState(Collection<Flow> flows, String name) SplitState(Collection<Flow> flows, String name, SplitState parentSplit) -
Method Summary
Modifier and TypeMethodDescriptionprotected FlowExecutionStatusdoAggregation(Collection<FlowExecution> results, FlowExecutor executor) getFlows()handle(FlowExecutor executor) Execute the flows in parallel by passing them to theTaskExecutorand wait for all of them to finish before proceeding.booleanInquire as to whether aStateis an end state.voidsetTaskExecutor(org.springframework.core.task.TaskExecutor taskExecutor) Public setter for the taskExecutor.Methods inherited from class org.springframework.batch.core.job.flow.support.state.AbstractState
getName, toString
-
Constructor Details
-
SplitState
- Parameters:
flows- collection ofFlowinstances.name- the name of the state.
-
SplitState
- Parameters:
flows- collection ofFlowinstances.name- the name of the state.parentSplit- the parentSplitState.
-
-
Method Details
-
setTaskExecutor
public void setTaskExecutor(org.springframework.core.task.TaskExecutor taskExecutor) Public setter for the taskExecutor.- Parameters:
taskExecutor- the taskExecutor to set
-
getFlows
- Specified by:
getFlowsin interfaceFlowHolder- Returns:
- the flows
-
handle
Execute the flows in parallel by passing them to theTaskExecutorand wait for all of them to finish before proceeding.- Specified by:
handlein interfaceState- Specified by:
handlein classAbstractState- Parameters:
executor- the context passed in by the caller- Returns:
- a status for the execution
- Throws:
Exception- if anything goes wrong- See Also:
-
doAggregation
protected FlowExecutionStatus doAggregation(Collection<FlowExecution> results, FlowExecutor executor) -
isEndState
public boolean isEndState()Description copied from interface:StateInquire as to whether aStateis an end state. Implementations should return false if processing can continue, even if that would require a restart.- Specified by:
isEndStatein interfaceState- Returns:
- true if this
Stateis the end of processing
-