|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JobRepository
Repository for storing batch JobExecution
and StepExecution
s.
Before using any methods, a JobExecution
must first be obtained using
the createJobExecution method. Once a JobExecution
is obtained, they
can be updated.
Method Summary | |
---|---|
JobExecution |
createJobExecution(Job job,
JobParameters jobParameters)
Find or create a JobExecution for a given Job and
JobParameters . |
StepExecution |
getLastStepExecution(JobInstance jobInstance,
Step step)
|
int |
getStepExecutionCount(JobInstance jobInstance,
Step step)
|
void |
saveOrUpdate(JobExecution jobExecution)
Save or Update a JobExecution . |
void |
saveOrUpdate(StepExecution stepExecution)
Save or update a StepExecution . |
void |
saveOrUpdateExecutionContext(StepExecution stepExecution)
Save the ExecutionContext of the given StepExecution . |
Method Detail |
---|
JobExecution createJobExecution(Job job, JobParameters jobParameters) throws JobExecutionAlreadyRunningException, JobRestartException, JobInstanceAlreadyCompleteException
JobExecution
for a given Job
and
JobParameters
. If the Job
was already executed with
these JobParameters
, its persisted values (including ID) will be
returned in a new JobInstance
, associated with the
JobExecution
. If no previous instance is found, the execution
will be associated with a new JobInstance
jobParameters
- the runtime parameters for the jobjob
- the job the execution should be associated with.
JobExecution
for the arguments provided
JobExecutionAlreadyRunningException
- if there is a
JobExecution
already running for the job instance with the
provided job and parameters.
JobRestartException
- if one or more existing JobInstance
s
is found with the same parameters and Job.isRestartable()
is
false.
JobInstanceAlreadyCompleteException
- if a JobInstance
is
found and was already completed successfully.void saveOrUpdate(JobExecution jobExecution)
JobExecution
. If no ID is found a new instance
will be saved. If an ID does exist it will be updated. The ID should only
be assigned to a JobExecution
by calling this method - it should
be left blank on the first call, and assigned by the
JobRepository
.
Preconditions: JobExecution
must contain a valid
JobInstance
.
jobExecution
- void saveOrUpdate(StepExecution stepExecution)
StepExecution
. If no ID is found a new instance
will be created (and saved). If an ID does exist it will be updated. It
is not advisable that an ID be assigned before calling this method.
Instead, it should be left blank, to be assigned by a
JobRepository
. The ExecutionContext
of the
StepExecution
is not saved: see
saveOrUpdateExecutionContext(StepExecution)
.
Preconditions: StepExecution
must have a valid Step
.
stepExecution
- void saveOrUpdateExecutionContext(StepExecution stepExecution)
ExecutionContext
of the given StepExecution
.
Implementations are allowed to ensure that the StepExecution
is
already saved by calling saveOrUpdate(StepExecution)
before
saving the ExecutionContext
.
stepExecution
- the StepExecution
containing the
ExecutionContext
to be saved.StepExecution getLastStepExecution(JobInstance jobInstance, Step step)
int getStepExecutionCount(JobInstance jobInstance, Step step)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |