C# Class Summer.Batch.Core.Job.SimpleStepHandler

Implementation of IStepHandler that manages repository and restart concerns.
Inheritance: IStepHandler, IInitializationPostOperations
Show file Open project: SummerBatch/SummerBatch

Public Methods

Method Description
AfterPropertiesSet ( ) : void

Check mandatory properties (jobRepository). @see IInitializationPostOperations#AfterPropertiesSet .

HandleStep ( IStep step, JobExecution execution ) : StepExecution

@see IStepHandler#HandleStep .

SimpleStepHandler ( ) : NLog

Convenient default constructor for configuration usage.

SimpleStepHandler ( IJobRepository jobRepository ) : NLog

Custom constructor using a job repository.

SimpleStepHandler ( IJobRepository jobRepository, ExecutionContext executionContext ) : NLog

Custom constructor using a job repository and an execution context.

Protected Methods

Method Description
ShouldStart ( StepExecution lastStepExecution, JobExecution jobExecution, IStep step ) : bool

Given a step and configuration, return true if the step should start, false if it should not, and throw an exception if the job should finish.

Private Methods

Method Description
HandleRestart ( StepExecution lastStepExecution, StepExecution currentStepExecution ) : void

Handle restartability if needed.

HandleStepExecution ( IStep step, JobExecution execution, StepExecution currentStepExecution ) : void

Handle normal step execution.

StepExecutionPartOfExistingJobExecution ( JobExecution jobExecution, StepExecution stepExecution ) : bool

Method Details

AfterPropertiesSet() public method

Check mandatory properties (jobRepository). @see IInitializationPostOperations#AfterPropertiesSet .
public AfterPropertiesSet ( ) : void
return void

HandleStep() public method

@see IStepHandler#HandleStep .
     
public HandleStep ( IStep step, JobExecution execution ) : StepExecution
step IStep
execution JobExecution
return StepExecution

ShouldStart() protected method

Given a step and configuration, return true if the step should start, false if it should not, and throw an exception if the job should finish.
   
protected ShouldStart ( StepExecution lastStepExecution, JobExecution jobExecution, IStep step ) : bool
lastStepExecution StepExecution
jobExecution JobExecution
step IStep
return bool

SimpleStepHandler() public method

Convenient default constructor for configuration usage.
public SimpleStepHandler ( ) : NLog
return NLog

SimpleStepHandler() public method

Custom constructor using a job repository.
public SimpleStepHandler ( IJobRepository jobRepository ) : NLog
jobRepository IJobRepository
return NLog

SimpleStepHandler() public method

Custom constructor using a job repository and an execution context.
public SimpleStepHandler ( IJobRepository jobRepository, ExecutionContext executionContext ) : NLog
jobRepository IJobRepository
executionContext ExecutionContext
return NLog