C# Class Summer.Batch.Core.Partition.Support.SimpleStepExecutionSplitter

Generic implementation of IStepExecutionSplitter that delegates to a IPartitioner to generate ExecutionContext instances. Takes care of restartability and identifying the step executions from previous runs of the same job. The generated StepExecution instances have names that identify them uniquely in the partition. The name is constructed from a base (name of the target step) plus a suffix taken from the IPartitioner identifiers, separated by a colon, e.g. {step1:partition0, step1:partition1, ...}.
Inheritance: IStepExecutionSplitter, IInitializationPostOperations
ファイルを表示 Open project: SummerBatch/SummerBatch

Public Methods

Method Description
AfterPropertiesSet ( ) : void

Post-init checks. IInitializationPostOperations#AfterPropertiesSet .

SimpleStepExecutionSplitter ( ) : Summer.Batch.Core.Repository

Default constructor for convenience in configuration.

SimpleStepExecutionSplitter ( IJobRepository jobRepository, bool allowStartIfComplete, string stepName, IPartitioner partitioner ) : Summer.Batch.Core.Repository

Constructs a SimpleStepExecutionSplitter from its mandatory properties.

Split ( StepExecution stepExecution, int gridSize ) : HashSet

see IStepExecutionSplitter#Split .

Protected Methods

Method Description
GetStartable ( StepExecution stepExecution, ExecutionContext context ) : bool

Should it start ?

Private Methods

Method Description
GetContexts ( StepExecution stepExecution, int gridSize ) : ExecutionContext>.IDictionary

HandleStoppedOrFailedStatus ( BatchStatus stepStatus ) : bool
HandleUnknownStatus ( BatchStatus stepStatus ) : void
IsSameJobExecution ( StepExecution stepExecution, StepExecution lastStepExecution ) : bool

Tests if same job execution.

PreventFromRestarting ( BatchStatus stepStatus ) : void
ShouldStart ( bool allowStartIfComplete, StepExecution stepExecution, StepExecution lastStepExecution ) : bool

Tests if step execution should start.

Method Details

AfterPropertiesSet() public method

Post-init checks. IInitializationPostOperations#AfterPropertiesSet .
 
public AfterPropertiesSet ( ) : void
return void

GetStartable() protected method

Should it start ?
 
protected GetStartable ( StepExecution stepExecution, ExecutionContext context ) : bool
stepExecution StepExecution
context ExecutionContext
return bool

SimpleStepExecutionSplitter() public method

Default constructor for convenience in configuration.
public SimpleStepExecutionSplitter ( ) : Summer.Batch.Core.Repository
return Summer.Batch.Core.Repository

SimpleStepExecutionSplitter() public method

Constructs a SimpleStepExecutionSplitter from its mandatory properties.
public SimpleStepExecutionSplitter ( IJobRepository jobRepository, bool allowStartIfComplete, string stepName, IPartitioner partitioner ) : Summer.Batch.Core.Repository
jobRepository IJobRepository
allowStartIfComplete bool flag specifying preferences on restart
stepName string
partitioner IPartitioner a IPartitioner to use for generating input parameters
return Summer.Batch.Core.Repository

Split() public method

see IStepExecutionSplitter#Split .
public Split ( StepExecution stepExecution, int gridSize ) : HashSet
stepExecution StepExecution
gridSize int
return HashSet