接口 FlowExecutor
- 所有已知实现类:
JobFlowExecutor
,JsrFlowExecutor
public interface FlowExecutor
Context and execution strategy forFlowJob
to allow it to delegate its execution step by step.- 从以下版本开始:
- 2.0
- 作者:
- Dave Syer, Mahmoud Ben Hassine
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 void
abandonStepExecution()
Handle any status changes that might be needed at the start of a state.void
addExitStatus(java.lang.String code)
void
close(FlowExecution result)
Chance to clean up resources at the end of a flow (whether it completed successfully or not).java.lang.String
executeStep(Step step)
JobExecution
getJobExecution()
StepExecution
getStepExecution()
boolean
isRestart()
void
updateJobExecutionStatus(FlowExecutionStatus status)
Handle any status changes that might be needed in theJobExecution
.
方法详细资料
executeStep
java.lang.String executeStep(Step step) throws JobInterruptedException, JobRestartException, StartLimitExceededException
- 参数:
step
- aStep
to execute- 返回:
- the exit status that drives the surrounding
Flow
- 抛出:
StartLimitExceededException
- thrown if start limit is exceeded.JobRestartException
- thrown if job restart is not allowed.JobInterruptedException
- thrown if job was interrupted.
getJobExecution
JobExecution getJobExecution()
- 返回:
- the current
JobExecution
getStepExecution
@Nullable StepExecution getStepExecution()
- 返回:
- the latest
StepExecution
or null if there is none
close
void close(FlowExecution result)
Chance to clean up resources at the end of a flow (whether it completed successfully or not).- 参数:
result
- the finalFlowExecution
abandonStepExecution
void abandonStepExecution()
Handle any status changes that might be needed at the start of a state.
updateJobExecutionStatus
void updateJobExecutionStatus(FlowExecutionStatus status)
Handle any status changes that might be needed in theJobExecution
.- 参数:
status
- status to update theJobExecution
to.
isRestart
boolean isRestart()
- 返回:
- true if the flow is at the beginning of a restart
addExitStatus
void addExitStatus(java.lang.String code)
- 参数:
code
- the label for the exit status when a flow or sub-flow ends