Summer.Batch.Core.Step.Tasklet.TaskletStep Class Reference

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)). More...

Inheritance diagram for Summer.Batch.Core.Step.Tasklet.TaskletStep:
Summer.Batch.Core.Step.AbstractStep Summer.Batch.Core.IStep Summer.Batch.Common.Factory.IInitializationPostOperations

Public Member Functions

 TaskletStep (string name)
 Custom constructor with name. More...
 
 TaskletStep ()
 Default constructor. More...
 
void RegisterStream (IItemStream stream)
 Register a single IItemStream for callbacks to the stream interface. More...
 
void SetStreams (IItemStream[] streams)
 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. More...
 
void Dispose ()
 see https://msdn.microsoft.com/fr-fr/library/ms244737.aspx More...
 
- Public Member Functions inherited from Summer.Batch.Core.Step.AbstractStep
virtual void AfterPropertiesSet ()
 used programmatically by JobStepBuilder ... IInitializationPostOperations::AfterPropertiesSet. More...
 
void Execute (StepExecution stepExecution)
 Template method for step execution logic - calls abstract methods for resource initialization ( Open), execution Logic (DoExecute) and resource closing (Close). More...
 
void RegisterStepExecutionListener (IStepExecutionListener listener)
 Registers step execution listener. More...
 
void SetStepExecutionListeners (IStepExecutionListener[] listeners)
 Registers an array of step execution listeners. More...
 
override string ToString ()
 ToString override. More...
 

Public Attributes

const string TaskletTypeKey = "batch.taskletType"
 Tasklet type constant. More...
 

Protected Member Functions

override void Close (ExecutionContext ctx)
 Delegates to composite stream closes. More...
 
override void Open (ExecutionContext ctx)
 Delegates to composite stream open More...
 
Semaphore CreateSemaphore ()
 
override void DoExecute (StepExecution stepExecution)
 Actual taskletstep execution. More...
 
- Protected Member Functions inherited from Summer.Batch.Core.Step.AbstractStep
 AbstractStep (string name)
 Custom constructor with name. More...
 
 AbstractStep ()
 Default constructor. More...
 
void DoExecutionRelease ()
 Releases the most recent StepExecution More...
 
void DoExecutionRegistration (StepExecution stepExecution)
 Registers the StepExecution for property resolution via StepScope More...
 

Properties

IRepeatOperations StepOperations [set]
 Step operations property. More...
 
IStepInterruptionPolicy InterruptionPolicy [set]
 Interruption policy property. More...
 
ITasklet Tasklet [get, set]
 Tasklet property. More...
 
- Properties inherited from Summer.Batch.Core.Step.AbstractStep
string Name [get, set]
 Name property. More...
 
bool AllowStartIfComplete [get, set]
 Allow start if complete flag property. More...
 
int StartLimit [get, set]
 Start limit for this step. More...
 
IJobRepository JobRepository [get, set]
 Job repository property. More...
 
- Properties inherited from Summer.Batch.Core.IStep
string Name [get]
 Name. More...
 
bool AllowStartIfComplete [get, set]
 Allow start if complete flag. More...
 
int StartLimit [get, set]
 Start limit. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

Summer.Batch.Core.Step.Tasklet.TaskletStep.TaskletStep ( string  name)

Custom constructor with name.

Parameters
name
Summer.Batch.Core.Step.Tasklet.TaskletStep.TaskletStep ( )

Default constructor.

Member Function Documentation

override void Summer.Batch.Core.Step.Tasklet.TaskletStep.Close ( ExecutionContext  ctx)
protectedvirtual

Delegates to composite stream closes.

Parameters
ctx

Reimplemented from Summer.Batch.Core.Step.AbstractStep.

Semaphore Summer.Batch.Core.Step.Tasklet.TaskletStep.CreateSemaphore ( )
protected

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

Returns
a semaphore for locking access to the JobRepository
void Summer.Batch.Core.Step.Tasklet.TaskletStep.Dispose ( )
override void Summer.Batch.Core.Step.Tasklet.TaskletStep.DoExecute ( StepExecution  stepExecution)
protectedvirtual

Actual taskletstep execution.

Parameters
stepExecution
Exceptions
Exception 

Implements Summer.Batch.Core.Step.AbstractStep.

override void Summer.Batch.Core.Step.Tasklet.TaskletStep.Open ( ExecutionContext  ctx)
protectedvirtual

Delegates to composite stream open

Parameters
ctx

Reimplemented from Summer.Batch.Core.Step.AbstractStep.

void Summer.Batch.Core.Step.Tasklet.TaskletStep.RegisterStream ( IItemStream  stream)

Register a single IItemStream for callbacks to the stream interface.

Parameters
stream
void Summer.Batch.Core.Step.Tasklet.TaskletStep.SetStreams ( IItemStream[]  streams)

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.

Parameters
streams

Member Data Documentation

const string Summer.Batch.Core.Step.Tasklet.TaskletStep.TaskletTypeKey = "batch.taskletType"

Tasklet type constant.

Property Documentation

IStepInterruptionPolicy Summer.Batch.Core.Step.Tasklet.TaskletStep.InterruptionPolicy
set

Interruption policy property.

IRepeatOperations Summer.Batch.Core.Step.Tasklet.TaskletStep.StepOperations
set

Step operations property.

ITasklet Summer.Batch.Core.Step.Tasklet.TaskletStep.Tasklet
getset

Tasklet property.


The documentation for this class was generated from the following file:
  • Summer.Batch.Core/Core/Step/Tasklet/TaskletStep.cs