public interface TaskJobService
Modifier and Type | Method and Description |
---|---|
int |
countJobExecutions()
Retrieves the total number of the job executions.
|
int |
countJobExecutionsForJob(String jobName)
Retrieves the total number
JobExecution that match a specific job name. |
int |
countJobInstances(String jobName)
Retrieves the total number of job instances for a job name.
|
TaskJobExecution |
getJobExecution(long id)
Retrieves a JobExecution from the JobRepository and matches it with a task id.
|
JobInstanceExecutions |
getJobInstance(long id)
Retrieves a
JobInstance from the JobRepository and matches it with the associated
JobExecution s. |
List<TaskJobExecution> |
listJobExecutions(org.springframework.data.domain.Pageable pageable)
Retrieves Pageable list of
JobExecution s from the JobRepository and matches
the data with a task id. |
List<TaskJobExecution> |
listJobExecutionsForJob(org.springframework.data.domain.Pageable pageable,
String jobName)
Retrieves Pageable list of
JobExecution from the JobRepository with a
specific jobName and matches the data with a task id. |
List<JobInstanceExecutions> |
listTaskJobInstancesForJobName(org.springframework.data.domain.Pageable pageable,
String jobName)
Retrieves Pageable list of
JobInstanceExecutions from the JobRepository with a
specific jobName and matches the data with the associated JobExecutions. |
void |
restartJobExecution(long jobExecutionId)
Restarts a
JobExecution IF the respective JobExecution
is actually deemed restartable. |
void |
stopJobExecution(long jobExecutionId)
Requests a
JobExecution to stop. |
List<TaskJobExecution> listJobExecutions(org.springframework.data.domain.Pageable pageable) throws org.springframework.batch.core.launch.NoSuchJobExecutionException
JobExecution
s from the JobRepository and matches
the data with a task id.pageable
- enumerates the data to be returned.TaskJobExecution
s.org.springframework.batch.core.launch.NoSuchJobExecutionException
List<TaskJobExecution> listJobExecutionsForJob(org.springframework.data.domain.Pageable pageable, String jobName) throws org.springframework.batch.core.launch.NoSuchJobException
JobExecution
from the JobRepository with a
specific jobName and matches the data with a task id.pageable
- enumerates the data to be returned.jobName
- the name of the job for which to search.TaskJobExecution
s.org.springframework.batch.core.launch.NoSuchJobException
TaskJobExecution getJobExecution(long id) throws org.springframework.batch.core.launch.NoSuchJobExecutionException
id
- the id of the JobExecution
TaskJobExecution
s associated with the id.org.springframework.batch.core.launch.NoSuchJobExecutionException
List<JobInstanceExecutions> listTaskJobInstancesForJobName(org.springframework.data.domain.Pageable pageable, String jobName) throws org.springframework.batch.core.launch.NoSuchJobException
JobInstanceExecutions
from the JobRepository with a
specific jobName and matches the data with the associated JobExecutions.pageable
- enumerates the data to be returned.jobName
- the name of the job for which to search.JobInstanceExecutions
.org.springframework.batch.core.launch.NoSuchJobException
JobInstanceExecutions getJobInstance(long id) throws org.springframework.batch.core.launch.NoSuchJobInstanceException, org.springframework.batch.core.launch.NoSuchJobException
JobInstance
from the JobRepository and matches it with the associated
JobExecution
s.id
- the id of the JobInstance
JobInstanceExecutions
associated with the id.org.springframework.batch.core.launch.NoSuchJobInstanceException
org.springframework.batch.core.launch.NoSuchJobException
int countJobInstances(String jobName) throws org.springframework.batch.core.launch.NoSuchJobException
jobName
- the name of the job instance.org.springframework.batch.core.launch.NoSuchJobException
int countJobExecutions()
int countJobExecutionsForJob(String jobName) throws org.springframework.batch.core.launch.NoSuchJobException
JobExecution
that match a specific job name.jobName
- the job name to search.JobExecution
s that match the job name.org.springframework.batch.core.launch.NoSuchJobException
void restartJobExecution(long jobExecutionId) throws org.springframework.batch.core.launch.NoSuchJobExecutionException
JobExecution
IF the respective JobExecution
is actually deemed restartable. Otherwise a JobNotRestartableException
is being thrown.jobExecutionId
- The id of the JobExecution to restartorg.springframework.batch.core.launch.NoSuchJobExecutionException
- Thrown if the JobExecution for the provided id does not existvoid stopJobExecution(long jobExecutionId) throws org.springframework.batch.core.launch.NoSuchJobExecutionException, org.springframework.batch.core.launch.JobExecutionNotRunningException
JobExecution
to stop.
Please remember, that calling this method only requests a job execution
to stop processing. This method does not guarantee a JobExecution
to stop. It is the responsibility of the implementor of the Job
to
react to that request. Furthermore, this method does not interfere with the
associated TaskExecution
.jobExecutionId
- The id of the JobExecution
to stoporg.springframework.batch.core.launch.NoSuchJobExecutionException
org.springframework.batch.core.launch.JobExecutionNotRunningException
JobService.stop(Long)
Copyright © 2016 Pivotal Software, Inc.. All rights reserved.