Summer.Batch.Core.Repository.IJobRepository Interface Reference

Repository responsible for persistence of batch meta-data entities. More...

Inheritance diagram for Summer.Batch.Core.Repository.IJobRepository:
Summer.Batch.Core.Repository.Support.SimpleJobRepository

Public Member Functions

bool IsJobInstanceExists (string jobName, JobParameters jobParameters)
 Checks if an instance of this job already exists with the parameters provided. More...
 
JobInstance CreateJobInstance (string jobName, JobParameters jobParameters)
 Creates a new JobInstance with the name and job parameters provided. More...
 
JobExecution CreateJobExecution (JobInstance jobInstance, JobParameters jobParameters, string jobConfigurationLocation)
 Creates a new JobExecution based upon the JobInstance it's associated with, the JobParameters used to execute it with and the location of the configuration file that defines the job. More...
 
JobExecution CreateJobExecution (String jobName, JobParameters jobParameters)
 
void Update (JobExecution jobExecution)
 Updates the JobExecution (but not its ExecutionContext). More...
 
void Add (StepExecution stepExecution)
 Saves the StepExecution and its ExecutionContext. ID will be assigned - it is not permitted that an ID be assigned before calling this method. Instead, it should be left blank, to be assigned by a JobRepository. More...
 
void AddAll (ICollection< StepExecution > stepExecutions)
 Saves a collection of StepExecutions and each ExecutionContext. The StepExecution ID will be assigned - it is not permitted that an ID be assigned before calling this method. Instead, it should be left blank, to be assigned by JobRepository. More...
 
void Update (StepExecution stepExecution)
 Updates the StepExecution (but not its ExecutionContext). Preconditions: StepExecution must be saved (have an id assigned). More...
 
void UpdateExecutionContext (StepExecution stepExecution)
 
void UpdateExecutionContext (JobExecution jobExecution)
 
StepExecution GetLastStepExecution (JobInstance jobInstance, string stepName)
 Returns the last step execution. More...
 
int GetStepExecutionCount (JobInstance jobInstance, string stepName)
 Returns the step executions count. More...
 
JobExecution GetLastJobExecution (string jobName, JobParameters jobParameters)
 Returns the last JobExecution. More...
 

Detailed Description

Repository responsible for persistence of batch meta-data entities.

Member Function Documentation

void Summer.Batch.Core.Repository.IJobRepository.Add ( StepExecution  stepExecution)

Saves the StepExecution and its ExecutionContext. ID will be assigned - it is not permitted that an ID be assigned before calling this method. Instead, it should be left blank, to be assigned by a JobRepository.

Preconditions: StepExecution must have a valid Step.

Parameters
stepExecution

Implemented in Summer.Batch.Core.Repository.Support.SimpleJobRepository.

void Summer.Batch.Core.Repository.IJobRepository.AddAll ( ICollection< StepExecution stepExecutions)

Saves a collection of StepExecutions and each ExecutionContext. The StepExecution ID will be assigned - it is not permitted that an ID be assigned before calling this method. Instead, it should be left blank, to be assigned by JobRepository.

Preconditions: StepExecution must have a valid Step.

Parameters
stepExecutions

Implemented in Summer.Batch.Core.Repository.Support.SimpleJobRepository.

JobExecution Summer.Batch.Core.Repository.IJobRepository.CreateJobExecution ( JobInstance  jobInstance,
JobParameters  jobParameters,
string  jobConfigurationLocation 
)

Creates a new JobExecution based upon the JobInstance it's associated with, the JobParameters used to execute it with and the location of the configuration file that defines the job.

Parameters
jobInstance
jobParameters
jobConfigurationLocation
Returns

Implemented in Summer.Batch.Core.Repository.Support.SimpleJobRepository.

JobExecution Summer.Batch.Core.Repository.IJobRepository.CreateJobExecution ( String  jobName,
JobParameters  jobParameters 
)

Creates a JobExecution for a given Job and JobParameters. If matching JobInstance already exists, the job must be restartable and it's last JobExecution must not be completed. If matching JobInstance does not exist yet it will be created.

If this method is run in a transaction (as it normally would be) with isolation level at Isolation::REPEATABLE_READ or better, then this method should block if another transaction is already executing it (for the same JobParameters and job name). The first transaction to complete in this scenario obtains a valid JobExecution, and others throw JobExecutionAlreadyRunningException (or timeout). There are no such guarantees if the JobInstanceDao and JobExecutionDao do not respect the transaction isolation levels (e.g. if using a non-relational data-store, or if the platform does not support the higher isolation levels).

Parameters
jobName
jobParameters
Returns
Exceptions
JobExecutionAlreadyRunningException 
JobRestartException 
JobInstanceAlreadyCompleteException 
JobInstance Summer.Batch.Core.Repository.IJobRepository.CreateJobInstance ( string  jobName,
JobParameters  jobParameters 
)

Creates a new JobInstance with the name and job parameters provided.

Parameters
jobName
jobParameters
Returns

Implemented in Summer.Batch.Core.Repository.Support.SimpleJobRepository.

JobExecution Summer.Batch.Core.Repository.IJobRepository.GetLastJobExecution ( string  jobName,
JobParameters  jobParameters 
)

Returns the last JobExecution.

Parameters
jobNamethe name of the job that might have run
jobParametersparameters identifying the JobInstance
Returns
the last execution of job if exists, null otherwise

Implemented in Summer.Batch.Core.Repository.Support.SimpleJobRepository.

StepExecution Summer.Batch.Core.Repository.IJobRepository.GetLastStepExecution ( JobInstance  jobInstance,
string  stepName 
)

Returns the last step execution.

Parameters
jobInstance
stepNamethe name of the step execution that might have run.
Returns
the last execution of step for the given job instance.

Implemented in Summer.Batch.Core.Repository.Support.SimpleJobRepository.

int Summer.Batch.Core.Repository.IJobRepository.GetStepExecutionCount ( JobInstance  jobInstance,
string  stepName 
)

Returns the step executions count.

Parameters
jobInstance
stepNamethe name of the step execution that might have run.
Returns
the execution count of the step within the given job instance.

Implemented in Summer.Batch.Core.Repository.Support.SimpleJobRepository.

bool Summer.Batch.Core.Repository.IJobRepository.IsJobInstanceExists ( string  jobName,
JobParameters  jobParameters 
)

Checks if an instance of this job already exists with the parameters provided.

Parameters
jobName
jobParameters
Returns

Implemented in Summer.Batch.Core.Repository.Support.SimpleJobRepository.

void Summer.Batch.Core.Repository.IJobRepository.Update ( JobExecution  jobExecution)

Updates the JobExecution (but not its ExecutionContext).

Preconditions: JobExecution must contain a valid JobInstance and be saved (have an id assigned).

Parameters
jobExecution

Implemented in Summer.Batch.Core.Repository.Support.SimpleJobRepository.

void Summer.Batch.Core.Repository.IJobRepository.Update ( StepExecution  stepExecution)

Updates the StepExecution (but not its ExecutionContext). Preconditions: StepExecution must be saved (have an id assigned).

Parameters
stepExecution

Implemented in Summer.Batch.Core.Repository.Support.SimpleJobRepository.

void Summer.Batch.Core.Repository.IJobRepository.UpdateExecutionContext ( StepExecution  stepExecution)

Persists the updated ExecutionContexts of the given StepExecution.

Parameters
stepExecution

Implemented in Summer.Batch.Core.Repository.Support.SimpleJobRepository.

void Summer.Batch.Core.Repository.IJobRepository.UpdateExecutionContext ( JobExecution  jobExecution)

Persists the updated ExecutionContext of the given JobExecution

Parameters
jobExecution

Implemented in Summer.Batch.Core.Repository.Support.SimpleJobRepository.


The documentation for this interface was generated from the following file:
  • Summer.Batch.Core/Core/Repository/IJobRepository.cs