public interface JobService
Modifier and Type | Method and Description |
---|---|
org.springframework.batch.core.JobExecution |
abandon(Long jobExecutionId)
Deprecated.
|
void |
addStepExecutions(org.springframework.batch.core.JobExecution jobExecution) |
int |
countJobExecutions()
Deprecated.
|
int |
countJobExecutionsForJob(String jobName,
org.springframework.batch.core.BatchStatus status)
Deprecated.
|
int |
countJobInstances(String jobName)
Deprecated.
|
int |
countJobs()
Deprecated.
|
int |
countStepExecutionsForJobExecution(long jobExecutionId)
Deprecated.
|
int |
countStepExecutionsForStep(String jobName,
String stepName)
Count the step executions in the repository for a given step name (or pattern).
|
org.springframework.batch.core.JobExecution |
getJobExecution(Long jobExecutionId)
Get a
JobExecution by id. |
Collection<org.springframework.batch.core.JobExecution> |
getJobExecutionsForJobInstance(String jobName,
Long jobInstanceId)
Deprecated.
|
org.springframework.batch.core.JobInstance |
getJobInstance(long jobInstanceId)
Get a
job instance by id. |
org.springframework.batch.core.JobParameters |
getLastJobParameters(String jobName)
Deprecated.
|
org.springframework.batch.core.StepExecution |
getStepExecution(org.springframework.batch.core.JobExecution jobExecution,
Long stepExecutionId) |
org.springframework.batch.core.StepExecution |
getStepExecution(Long jobExecutionId,
Long stepExecutionId)
Locate a
StepExecution from its id and that of its parent JobExecution . |
Collection<org.springframework.batch.core.StepExecution> |
getStepExecutions(org.springframework.batch.core.JobExecution jobExecution) |
Collection<org.springframework.batch.core.StepExecution> |
getStepExecutions(Long jobExecutionId)
Get the
step executions for a given job execution (by id). |
Collection<String> |
getStepNamesForJob(String jobName)
Deprecated.
|
org.springframework.batch.core.JobExecution |
launch(String jobName,
org.springframework.batch.core.JobParameters params)
Deprecated.
|
Collection<org.springframework.batch.core.JobExecution> |
listJobExecutions(int start,
int count)
Deprecated.
|
Collection<org.springframework.batch.core.JobExecution> |
listJobExecutionsForJob(String jobName,
org.springframework.batch.core.BatchStatus status,
int pageOffset,
int pageSize)
List the
job executions for a job in descending order of creation
(usually close to execution order). |
Collection<JobExecutionWithStepCount> |
listJobExecutionsForJobWithStepCount(Date fromDate,
Date toDate,
int start,
int count)
Deprecated.
|
Collection<JobExecutionWithStepCount> |
listJobExecutionsForJobWithStepCount(String jobName,
int start,
int count)
Deprecated.
|
Collection<JobExecutionWithStepCount> |
listJobExecutionsForJobWithStepCountFilteredByJobInstanceId(int jobInstanceId,
int start,
int count)
Deprecated.
|
Collection<JobExecutionWithStepCount> |
listJobExecutionsForJobWithStepCountFilteredByTaskExecutionId(int taskExecutionId,
int start,
int count)
Deprecated.
|
Collection<JobExecutionWithStepCount> |
listJobExecutionsWithStepCount(int start,
int count)
Deprecated.
|
Collection<org.springframework.batch.core.JobInstance> |
listJobInstances(String jobName,
int start,
int count)
Deprecated.
|
Collection<String> |
listJobs(int start,
int count)
Deprecated.
|
Collection<org.springframework.batch.core.StepExecution> |
listStepExecutionsForStep(String jobName,
String stepName,
int start,
int count)
List the
step executions for a step in descending order of
creation (usually close to execution order). |
org.springframework.batch.core.JobExecution |
restart(Long jobExecutionId)
Deprecated.
|
org.springframework.batch.core.JobExecution |
restart(Long jobExecutionId,
org.springframework.batch.core.JobParameters params)
Deprecated.
|
org.springframework.batch.core.JobExecution |
stop(Long jobExecutionId)
Send a signal to a job execution to stop processing.
|
int |
stopAll()
Deprecated.
|
@Deprecated org.springframework.batch.core.JobExecution launch(String jobName, org.springframework.batch.core.JobParameters params) throws org.springframework.batch.core.launch.NoSuchJobException, org.springframework.batch.core.repository.JobExecutionAlreadyRunningException, org.springframework.batch.core.repository.JobRestartException, org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException, org.springframework.batch.core.JobParametersInvalidException
jobName
- the job nameparams
- the JobParameters
JobExecution
if successfulorg.springframework.batch.core.launch.NoSuchJobException
- thrown if job specified does not existorg.springframework.batch.core.repository.JobExecutionAlreadyRunningException
- thrown if job is already executingorg.springframework.batch.core.repository.JobRestartException
- thrown if job failed to restartorg.springframework.batch.core.repository.JobInstanceAlreadyCompleteException
- thrown if job was already completeorg.springframework.batch.core.JobParametersInvalidException
- thrown if job parameters are invalid@Deprecated org.springframework.batch.core.JobParameters getLastJobParameters(String jobName) throws org.springframework.batch.core.launch.NoSuchJobException
JobParameters
used to execute a job successfully.jobName
- the name of the joborg.springframework.batch.core.launch.NoSuchJobException
- thrown if job specified does not exist@Deprecated org.springframework.batch.core.JobExecution restart(Long jobExecutionId) throws org.springframework.batch.core.launch.NoSuchJobExecutionException, org.springframework.batch.core.repository.JobExecutionAlreadyRunningException, org.springframework.batch.core.repository.JobRestartException, org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException, org.springframework.batch.core.launch.NoSuchJobException, org.springframework.batch.core.JobParametersInvalidException
jobExecutionId
- the job execution to restartJobExecution
if successfulorg.springframework.batch.core.launch.NoSuchJobExecutionException
- thrown if job execution specified does not existorg.springframework.batch.core.launch.NoSuchJobException
- thrown if job specified does not existorg.springframework.batch.core.repository.JobExecutionAlreadyRunningException
- thrown if job is already executingorg.springframework.batch.core.repository.JobRestartException
- thrown if job failed to restartorg.springframework.batch.core.repository.JobInstanceAlreadyCompleteException
- thrown if job was already completeorg.springframework.batch.core.JobParametersInvalidException
- thrown if job parameters are invalid@Deprecated org.springframework.batch.core.JobExecution restart(Long jobExecutionId, org.springframework.batch.core.JobParameters params) throws org.springframework.batch.core.launch.NoSuchJobExecutionException, org.springframework.batch.core.repository.JobExecutionAlreadyRunningException, org.springframework.batch.core.repository.JobRestartException, org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException, org.springframework.batch.core.launch.NoSuchJobException, org.springframework.batch.core.JobParametersInvalidException
jobExecutionId
- the job execution to restartparams
- the job parameters to use in the restartJobExecution
if successfulorg.springframework.batch.core.launch.NoSuchJobExecutionException
- thrown if job execution specified does not existorg.springframework.batch.core.launch.NoSuchJobException
- thrown if job specified does not existorg.springframework.batch.core.repository.JobExecutionAlreadyRunningException
- thrown if job is already executingorg.springframework.batch.core.repository.JobRestartException
- thrown if job failed to restartorg.springframework.batch.core.repository.JobInstanceAlreadyCompleteException
- thrown if job was already completeorg.springframework.batch.core.JobParametersInvalidException
- thrown if job parameters are invalidorg.springframework.batch.core.JobExecution stop(Long jobExecutionId) throws org.springframework.batch.core.launch.NoSuchJobExecutionException, org.springframework.batch.core.launch.JobExecutionNotRunningException
Job
and Step
implementations to ensure that the signal is
obeyed. In particular, if users provide a custom Tasklet
to a Step
it
must check the signal in the JobExecution
itself.jobExecutionId
- the job execution id to stopJobExecution
that was stoppedorg.springframework.batch.core.launch.NoSuchJobExecutionException
- thrown if job execution specified does not existorg.springframework.batch.core.launch.JobExecutionNotRunningException
- thrown if the job execution specified is not
running@Deprecated org.springframework.batch.core.JobExecution abandon(Long jobExecutionId) throws org.springframework.batch.core.launch.NoSuchJobExecutionException, org.springframework.batch.core.repository.JobExecutionAlreadyRunningException
JobExecution
as ABANDONED. If a stop signal is ignored because the
process died this is the best way to mark a job as finished with (as opposed to
STOPPED). An abandoned job execution can be restarted, but a stopping one cannot.jobExecutionId
- the job execution id to abortJobExecution
that was abortedorg.springframework.batch.core.launch.NoSuchJobExecutionException
- thrown if job execution specified does not existorg.springframework.batch.core.repository.JobExecutionAlreadyRunningException
- thrown if the job is running (it should be
stopped first)@Deprecated Collection<String> listJobs(int start, int count)
JobRepository
.start
- the start index of the job names to returncount
- the maximum number of job names to return@Deprecated int countJobs()
listJobs(int, int)
.org.springframework.batch.core.JobInstance getJobInstance(long jobInstanceId) throws org.springframework.batch.core.launch.NoSuchJobInstanceException
job instance
by id.jobInstanceId
- the id of the instancejob instance
org.springframework.batch.core.launch.NoSuchJobInstanceException
- thrown if the job instance specified does not exist@Deprecated Collection<org.springframework.batch.core.JobInstance> listJobInstances(String jobName, int start, int count) throws org.springframework.batch.core.launch.NoSuchJobException
job instances
in descending order of creation (usually
close to order of execution).jobName
- the name of the jobstart
- the index of the first to returncount
- the maximum number of instances to returnjob instances
org.springframework.batch.core.launch.NoSuchJobException
- thrown if job specified does not exist@Deprecated int countJobInstances(String jobName) throws org.springframework.batch.core.launch.NoSuchJobException
job instances
in the repository for a given job
name.jobName
- the name of the joborg.springframework.batch.core.launch.NoSuchJobException
- thrown if job specified does not exist@Deprecated Collection<JobExecutionWithStepCount> listJobExecutionsForJobWithStepCount(String jobName, int start, int count) throws org.springframework.batch.core.launch.NoSuchJobException
job executions
for a job in descending order
of creation (usually close to execution order).jobName
- the job namestart
- the start index of the first job executioncount
- the maximum number of executions to returnJobExecutionWithStepCount
org.springframework.batch.core.launch.NoSuchJobException
- thrown if job specified does not exist@Deprecated int countJobExecutionsForJob(String jobName, org.springframework.batch.core.BatchStatus status) throws org.springframework.batch.core.launch.NoSuchJobException
jobName
- the job namestatus
- the status of the joborg.springframework.batch.core.launch.NoSuchJobException
- thrown if job specified does not exist@Deprecated Collection<org.springframework.batch.core.JobExecution> getJobExecutionsForJobInstance(String jobName, Long jobInstanceId) throws org.springframework.batch.core.launch.NoSuchJobException
jobName
- the name of the jobjobInstanceId
- the id of the job instanceorg.springframework.batch.core.launch.NoSuchJobException
- thrown if job specified does not exist@Deprecated Collection<org.springframework.batch.core.JobExecution> listJobExecutions(int start, int count)
job executions
in descending order of creation (usually
close to execution order).start
- the index of the first execution to returncount
- the maximum number of executionsJobExecution
@Deprecated Collection<JobExecutionWithStepCount> listJobExecutionsWithStepCount(int start, int count)
JobExecutions
in descending order of
creation (usually close to execution order) without step execution data.start
- the index of the first execution to returncount
- the maximum number of executionsJobExecutionWithStepCount
@Deprecated int countJobExecutions()
listJobExecutions(int, int)
.org.springframework.batch.core.JobExecution getJobExecution(Long jobExecutionId) throws org.springframework.batch.core.launch.NoSuchJobExecutionException
JobExecution
by id.jobExecutionId
- the job execution idJobExecution
org.springframework.batch.core.launch.NoSuchJobExecutionException
- thrown if job execution specified does not existCollection<org.springframework.batch.core.StepExecution> getStepExecutions(Long jobExecutionId) throws org.springframework.batch.core.launch.NoSuchJobExecutionException
step executions
for a given job execution (by id).jobExecutionId
- the parent job execution idorg.springframework.batch.core.launch.NoSuchJobExecutionException
- thrown if job execution specified does not existCollection<org.springframework.batch.core.StepExecution> getStepExecutions(org.springframework.batch.core.JobExecution jobExecution) throws org.springframework.batch.core.launch.NoSuchJobExecutionException
org.springframework.batch.core.launch.NoSuchJobExecutionException
void addStepExecutions(org.springframework.batch.core.JobExecution jobExecution)
Collection<org.springframework.batch.core.StepExecution> listStepExecutionsForStep(String jobName, String stepName, int start, int count) throws org.springframework.batch.core.step.NoSuchStepException
step executions
for a step in descending order of
creation (usually close to execution order).jobName
- the name of the job associated with the step (or a pattern with
wildcards)stepName
- the step name (or a pattern with wildcards)start
- the start index of the first executioncount
- the maximum number of executions to returnStepExecution
org.springframework.batch.core.step.NoSuchStepException
- thrown if step specified does not existint countStepExecutionsForStep(String jobName, String stepName) throws org.springframework.batch.core.step.NoSuchStepException
jobName
- the job name (or a pattern with wildcards)stepName
- the step name (or a pattern with wildcards)org.springframework.batch.core.step.NoSuchStepException
- thrown if step specified does not exist@Deprecated int countStepExecutionsForJobExecution(long jobExecutionId)
jobExecutionId
- the id of the job execution.org.springframework.batch.core.StepExecution getStepExecution(Long jobExecutionId, Long stepExecutionId) throws NoSuchStepExecutionException, org.springframework.batch.core.launch.NoSuchJobExecutionException
StepExecution
from its id and that of its parent JobExecution
.jobExecutionId
- the job execution idstepExecutionId
- the step execution idStepExecution
NoSuchStepExecutionException
- thrown if the step execution specified does not
existorg.springframework.batch.core.launch.NoSuchJobExecutionException
- thrown if job execution specified does not existorg.springframework.batch.core.StepExecution getStepExecution(org.springframework.batch.core.JobExecution jobExecution, Long stepExecutionId) throws NoSuchStepExecutionException
NoSuchStepExecutionException
@Deprecated int stopAll()
@Deprecated Collection<String> getStepNamesForJob(String jobName) throws org.springframework.batch.core.launch.NoSuchJobException
jobName
- the name of the jobCollection
of step names.org.springframework.batch.core.launch.NoSuchJobException
- thrown if the job name cannot be locatedCollection<org.springframework.batch.core.JobExecution> listJobExecutionsForJob(String jobName, org.springframework.batch.core.BatchStatus status, int pageOffset, int pageSize) throws org.springframework.batch.core.launch.NoSuchJobException
job executions
for a job in descending order of creation
(usually close to execution order).jobName
- the job namestatus
- the status of the job executionpageOffset
- the start index of the first job executionpageSize
- the maximum number of executions to returnJobExecution
org.springframework.batch.core.launch.NoSuchJobException
- thrown if job specified does not exist@Deprecated Collection<JobExecutionWithStepCount> listJobExecutionsForJobWithStepCount(Date fromDate, Date toDate, int start, int count)
job executions
filtered by date range in
descending order of creation (usually close to execution order).fromDate
- the date which start date must be greater than.toDate
- the date which start date must be less than.start
- the start index of the first job executioncount
- the maximum number of executions to returnJobExecutionWithStepCount
@Deprecated Collection<JobExecutionWithStepCount> listJobExecutionsForJobWithStepCountFilteredByJobInstanceId(int jobInstanceId, int start, int count)
job executions
filtered by job instance id in
descending order of creation (usually close to execution order).jobInstanceId
- the job instance id associated with the execution.start
- the start index of the first job executioncount
- the maximum number of executions to returnJobExecutionWithStepCount
@Deprecated Collection<JobExecutionWithStepCount> listJobExecutionsForJobWithStepCountFilteredByTaskExecutionId(int taskExecutionId, int start, int count)
job executions
filtered by task execution id in
descending order of creation (usually close to execution order).taskExecutionId
- the task execution id associated with the execution.start
- the start index of the first job executioncount
- the maximum number of executions to returnJobExecutionWithStepCount
Copyright © 2024 Pivotal Software, Inc.. All rights reserved.