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. More...
Public Member Functions | |
JobExecution | Run (IJob job, JobParameters jobParameters) |
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. More... | |
void | AfterPropertiesSet () |
Ensure the required dependencies of an IJobRepository have been set. Used programmatically by JobStepBuilder see IInitializationPostOperations::AfterPropertiesSet More... | |
Static Protected Attributes | |
static readonly Logger | Logger = LogManager.GetCurrentClassLogger() |
Logger. More... | |
Properties | |
IJobRepository | JobRepository [set] |
Job repository property. More... | |
ITaskExecutor | TaskExecutor [set] |
Task executor property. More... | |
Detailed Description
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.
Member Function Documentation
void Summer.Batch.Core.Launch.Support.SimpleJobLauncher.AfterPropertiesSet | ( | ) |
Ensure the required dependencies of an IJobRepository have been set. Used programmatically by JobStepBuilder see IInitializationPostOperations::AfterPropertiesSet
- Exceptions
-
System.Exception
Implements Summer.Batch.Common.Factory.IInitializationPostOperations.
JobExecution Summer.Batch.Core.Launch.Support.SimpleJobLauncher.Run | ( | IJob | job, |
JobParameters | jobParameters | ||
) |
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.
- Parameters
-
job jobParameters
- Returns
- Exceptions
-
JobRestartException if the execution would be a re-start, but a re-start is either not allowed or not needed. JobExecutionAlreadyRunningException if the JobInstance already exists and has an execution already running JobInstanceAlreadyCompleteException if this instance has already completed successfully JobParametersInvalidException if given parameters do not pass validation process
Implements Summer.Batch.Core.Launch.IJobLauncher.
Member Data Documentation
|
staticprotected |
Logger.
Property Documentation
|
set |
Job repository property.
|
set |
Task executor property.
The documentation for this class was generated from the following file:
- Summer.Batch.Core/Core/Launch/Support/SimpleJobLauncher.cs