C# Class Summer.Batch.Core.Step.Tasklet.TaskletStep

Simple implementation of executing the step as a call to a ITasklet, possibly repeated, and each call surrounded by a transaction. The structure is therefore that of a loop with transaction boundary inside the loop. The loop is controlled by the step operations (StepOperations=RepeatOperations)). Clients can use interceptors in the step operations to intercept or listen to the iteration on a step-wide basis, for instance to get a callback when the step is complete. Those that want callbacks at the level of an individual tasks, can specify interceptors for the chunk operations.
Inheritance: AbstractStep, IDisposable
ファイルを表示 Open project: SummerBatch/SummerBatch Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void

see https://msdn.microsoft.com/fr-fr/library/ms244737.aspx

RegisterStream ( IItemStream stream ) : void

Register a single IItemStream for callbacks to the stream interface.

SetStreams ( IItemStream streams ) : void

Register each of the streams for callbacks at the appropriate time in the step. The IItemReader and IItemWriter are automatically registered, but it doesn't hurt to also register them here. Injected dependencies of the reader and writer are not automatically registered, so if you implement ItemWriter using delegation to another object which itself is a IItemStream, you need to register the delegate here.

TaskletStep ( ) : NLog

Default constructor.

TaskletStep ( string name ) : NLog

Custom constructor with name.

Protected Methods

Method Description
Close ( Summer.Batch.Infrastructure.Item.ExecutionContext ctx ) : void

Delegates to composite stream closes.

CreateSemaphore ( ) : Semaphore

Extension point mainly for test purposes so that the behaviour of the lock can be manipulated to simulate various pathologies.

DoExecute ( StepExecution stepExecution ) : void

Actual taskletstep execution.

Open ( Summer.Batch.Infrastructure.Item.ExecutionContext ctx ) : void

Delegates to composite stream open

Private Methods

Method Description
Dispose ( bool disposing ) : void

see https://msdn.microsoft.com/fr-fr/library/ms244737.aspx

Method Details

Close() protected method

Delegates to composite stream closes.
protected Close ( Summer.Batch.Infrastructure.Item.ExecutionContext ctx ) : void
ctx Summer.Batch.Infrastructure.Item.ExecutionContext
return void

CreateSemaphore() protected method

Extension point mainly for test purposes so that the behaviour of the lock can be manipulated to simulate various pathologies.
protected CreateSemaphore ( ) : Semaphore
return System.Threading.Semaphore

Dispose() public method

see https://msdn.microsoft.com/fr-fr/library/ms244737.aspx
public Dispose ( ) : void
return void

DoExecute() protected method

Actual taskletstep execution.
 
protected DoExecute ( StepExecution stepExecution ) : void
stepExecution StepExecution
return void

Open() protected method

Delegates to composite stream open
protected Open ( Summer.Batch.Infrastructure.Item.ExecutionContext ctx ) : void
ctx Summer.Batch.Infrastructure.Item.ExecutionContext
return void

RegisterStream() public method

Register a single IItemStream for callbacks to the stream interface.
public RegisterStream ( IItemStream stream ) : void
stream IItemStream
return void

SetStreams() public method

Register each of the streams for callbacks at the appropriate time in the step. The IItemReader and IItemWriter are automatically registered, but it doesn't hurt to also register them here. Injected dependencies of the reader and writer are not automatically registered, so if you implement ItemWriter using delegation to another object which itself is a IItemStream, you need to register the delegate here.
public SetStreams ( IItemStream streams ) : void
streams IItemStream
return void

TaskletStep() public method

Default constructor.
public TaskletStep ( ) : NLog
return NLog

TaskletStep() public method

Custom constructor with name.
public TaskletStep ( string name ) : NLog
name string
return NLog