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

ITaskletthat executes a system command. The system command is executed asynchronously using injected ITaskExecutor - timeout value is required to be set, so that the batch job does not hang forever if the external process hangs. Tasklet periodically checks for termination status (i.e. Command finished its execution or timeout expired or job was interrupted). The check interval is given by TerminationCheckInterval. When job interrupt is detected tasklet's execution is terminated immediately by throwing JobInterruptedException. NOTE : InterruptOnCancel is not being supported for now.
Inheritance: Summer.Batch.Core.Listener.StepExecutionListenerSupport, IStoppableTasklet, IInitializationPostOperations
Afficher le fichier Open project: SummerBatch/SummerBatch Class Usage Examples

Protected Properties

Свойство Type Description
Logger Logger

Méthodes publiques

Méthode Description
AfterPropertiesSet ( ) : void

@see IInitializationPostOperations#AfterPropertiesSet.

BeforeStep ( StepExecution stepExecution ) : void

@see IStepExecutionListener#BeforeStep.

Execute ( StepContribution contribution, Scope chunkContext ) : RepeatStatus

Execute system command and map its exit code to ExitStatus using SystemProcessExitCodeMapper.

Stop ( ) : void

IStoppableTasklet#Stop.

Private Methods

Méthode Description
CheckStoppingState ( Summer.Batch.Core.Scope.Context.ChunkContext chunkContext ) : void
ExecuteCommand ( ) : int

Wraps command execution into system process call.

HandleCompletion ( StepContribution contribution, Task systemCommandTask ) : RepeatStatus

Method Details

AfterPropertiesSet() public méthode

@see IInitializationPostOperations#AfterPropertiesSet.
public AfterPropertiesSet ( ) : void
Résultat void

BeforeStep() public méthode

@see IStepExecutionListener#BeforeStep.
public BeforeStep ( StepExecution stepExecution ) : void
stepExecution StepExecution
Résultat void

Execute() public méthode

Execute system command and map its exit code to ExitStatus using SystemProcessExitCodeMapper.
public Execute ( StepContribution contribution, Scope chunkContext ) : RepeatStatus
contribution StepContribution
chunkContext Scope
Résultat RepeatStatus

Stop() public méthode

IStoppableTasklet#Stop.
public Stop ( ) : void
Résultat void

Property Details

Logger protected_oe static_oe property

Logger.
protected static Logger Logger
Résultat Logger