类 JobFlowExecutor
- java.lang.Object
- org.springframework.batch.core.job.flow.JobFlowExecutor
- 所有已实现的接口:
FlowExecutor
- 直接已知子类:
JsrFlowExecutor
public class JobFlowExecutor extends java.lang.Object implements FlowExecutor
Implementation ofFlowExecutor
for use in components that need to execute a flow related to aJobExecution
.- 作者:
- Dave Syer, Michael Minella, Mahmoud Ben Hassine
字段概要
字段 修饰符和类型 字段 说明 protected ExitStatus
exitStatus
构造器概要
构造器 构造器 说明 JobFlowExecutor(JobRepository jobRepository, StepHandler stepHandler, JobExecution execution)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 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)
protected BatchStatus
findBatchStatus(FlowExecutionStatus status)
JobExecution
getJobExecution()
StepExecution
getStepExecution()
boolean
isRestart()
void
updateJobExecutionStatus(FlowExecutionStatus status)
Handle any status changes that might be needed in theJobExecution
.
字段详细资料
exitStatus
protected ExitStatus exitStatus
构造器详细资料
JobFlowExecutor
public JobFlowExecutor(JobRepository jobRepository, StepHandler stepHandler, JobExecution execution)
- 参数:
jobRepository
- instance ofJobRepository
.stepHandler
- instance ofStepHandler
.execution
- instance ofJobExecution
.
方法详细资料
executeStep
public java.lang.String executeStep(Step step) throws JobInterruptedException, JobRestartException, StartLimitExceededException
- 指定者:
executeStep
在接口中FlowExecutor
- 参数:
step
- aStep
to execute- 返回:
- the exit status that drives the surrounding
Flow
- 抛出:
JobInterruptedException
- thrown if job was interrupted.JobRestartException
- thrown if job restart is not allowed.StartLimitExceededException
- thrown if start limit is exceeded.
abandonStepExecution
public void abandonStepExecution()
从接口复制的说明:FlowExecutor
Handle any status changes that might be needed at the start of a state.- 指定者:
abandonStepExecution
在接口中FlowExecutor
updateJobExecutionStatus
public void updateJobExecutionStatus(FlowExecutionStatus status)
从接口复制的说明:FlowExecutor
Handle any status changes that might be needed in theJobExecution
.- 指定者:
updateJobExecutionStatus
在接口中FlowExecutor
- 参数:
status
- status to update theJobExecution
to.
getJobExecution
public JobExecution getJobExecution()
- 指定者:
getJobExecution
在接口中FlowExecutor
- 返回:
- the current
JobExecution
getStepExecution
@Nullable public StepExecution getStepExecution()
- 指定者:
getStepExecution
在接口中FlowExecutor
- 返回:
- the latest
StepExecution
or null if there is none
close
public void close(FlowExecution result)
从接口复制的说明:FlowExecutor
Chance to clean up resources at the end of a flow (whether it completed successfully or not).- 指定者:
close
在接口中FlowExecutor
- 参数:
result
- the finalFlowExecution
isRestart
public boolean isRestart()
- 指定者:
isRestart
在接口中FlowExecutor
- 返回:
- true if the flow is at the beginning of a restart
addExitStatus
public void addExitStatus(java.lang.String code)
- 指定者:
addExitStatus
在接口中FlowExecutor
- 参数:
code
- the label for the exit status when a flow or sub-flow ends
findBatchStatus
protected BatchStatus findBatchStatus(FlowExecutionStatus status)
- 参数:
status
-FlowExecutionStatus
to convert.- 返回:
- A
BatchStatus
appropriate for theFlowExecutionStatus
provided