C# Класс Summer.Batch.Core.Launch.Support.SimpleJobLauncher

Simple implementation of the IJobLauncher interface. The ITaskExecutor interface is used to launch a Job. This means that the type of executor set is very important. If a SyncTaskExecutor is used, then the job will be processed within the same thread that called the launcher. Care should be taken to ensure any users of this class understand fully whether or not the implementation of TaskExecutor used will start tasks synchronously or asynchronously. The default setting uses a synchronous task executor. There is only one required dependency of this Launcher, an IJobRepository. The IJobRepository is used to obtain a valid JobExecution. The Repository must be used because the provided Job could be a restart of an existing JobInstance, and only the Repository can reliably recreate it.
Наследование: IJobLauncher, IInitializationPostOperations
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
Logger Logger

Открытые методы

Метод Описание
AfterPropertiesSet ( ) : void

Ensure the required dependencies of an IJobRepository have been set. Used programmatically by JobStepBuilder see IInitializationPostOperations#AfterPropertiesSet

Run ( IJob job, JobParameters jobParameters ) : JobExecution

Runs the provided job with the given JobParameters. The JobParameters will be used to determine if this is an execution of an existing job instance, or if a new one should be created.

Приватные методы

Метод Описание
CreateJobAction ( IJob job, JobParameters jobParameters, JobExecution jobExecution ) : System.Action

Action creation helper. Given a job, job parameters and a job execution, will wrap the execution of the job into a System.Action.

HandleLastExecution ( IJob job, JobExecution lastExecution ) : void

Manage last job execution if required.

Описание методов

AfterPropertiesSet() публичный Метод

Ensure the required dependencies of an IJobRepository have been set. Used programmatically by JobStepBuilder see IInitializationPostOperations#AfterPropertiesSet
public AfterPropertiesSet ( ) : void
Результат void

Run() публичный Метод

Runs the provided job with the given JobParameters. The JobParameters will be used to determine if this is an execution of an existing job instance, or if a new one should be created.
  if the execution would be a re-start, but a re-start is either not allowed or not needed.  if the JobInstance already exists and has an execution already running   if this instance has already completed successfully  if given parameters do not pass validation process
public Run ( IJob job, JobParameters jobParameters ) : JobExecution
job IJob
jobParameters JobParameters
Результат JobExecution

Описание свойств

Logger защищенное статическое свойство

Logger.
protected static Logger Logger
Результат Logger