public interface JobOperator
| Modifier and Type | Method and Description |
|---|---|
void |
abandon(long executionId)
Set batch status to ABANDONED.
|
JobExecution |
getJobExecution(long executionId)
Return job execution for specified execution id
|
List<JobExecution> |
getJobExecutions(JobInstance instance)
Return all job executions belonging to the specified job instance.
|
JobInstance |
getJobInstance(long executionId)
Return the job instance for the specified execution id.
|
int |
getJobInstanceCount(String jobName)
Returns number of instances of a job with a particular name.
|
List<JobInstance> |
getJobInstances(String jobName,
int start,
int count)
Returns all JobInstances belonging to a job with a particular name
in reverse chronological order.
|
Set<String> |
getJobNames()
Returns a set of all job names known to the batch runtime.
|
Properties |
getParameters(long executionId)
Returns job parameters for a specified job instance.
|
List<Long> |
getRunningExecutions(String jobName)
Returns execution ids for job instances with the specified
name that have running executions.
|
List<StepExecution> |
getStepExecutions(long jobExecutionId)
Return StepExecutions for specified execution id.
|
long |
restart(long executionId,
Properties restartParameters)
Restarts a failed or stopped job instance.
|
long |
start(String jobXMLName,
Properties jobParameters)
Creates a new job instance and starts the first execution of that
instance.
|
void |
stop(long executionId)
Request a running job execution stops.
|
Set<String> getJobNames() throws JobSecurityException
JobSecurityExceptionint getJobInstanceCount(String jobName) throws NoSuchJobException, JobSecurityException
jobName - specifies the name of the job.NoSuchJobExceptionJobSecurityExceptionList<JobInstance> getJobInstances(String jobName, int start, int count) throws NoSuchJobException, JobSecurityException
jobName - specifies the job name.start - specifies the relative starting number (zero based) to
return from the
maximal list of job instances.count - specifies the number of job instances to return from the
starting position of the maximal list of job instances.NoSuchJobExceptionJobSecurityExceptionList<Long> getRunningExecutions(String jobName) throws NoSuchJobException, JobSecurityException
jobName - specifies the job name.NoSuchJobExceptionJobSecurityExceptionProperties getParameters(long executionId) throws NoSuchJobExecutionException, JobSecurityException
executionId - specifies the execution from which to retrieve the
parameters.NoSuchJobExecutionExceptionJobSecurityExceptionlong start(String jobXMLName, Properties jobParameters) throws JobStartException, JobSecurityException
jobXMLName - specifies the name of the Job XML describing the job.jobParameters - specifies the keyword/value pairs for attribute
substitution in the Job XML.JobStartExceptionJobSecurityExceptionlong restart(long executionId,
Properties restartParameters)
throws JobExecutionAlreadyCompleteException,
NoSuchJobExecutionException,
JobExecutionNotMostRecentException,
JobRestartException,
JobSecurityException
executionId - specifies the execution to to restart. This execution
must be the most recent execution that ran.restartParameters - specifies the keyword/value pairs for attribute
substitution in the Job XML.JobExecutionAlreadyCompleteExceptionNoSuchJobExecutionExceptionJobExecutionNotMostRecentException,JobRestartExceptionJobSecurityExceptionJobExecutionNotMostRecentExceptionvoid stop(long executionId) throws NoSuchJobExecutionException, JobExecutionNotRunningException, JobSecurityException
Note for partitioned batchlet steps the Batchlet stop method is invoked on each thread actively processing a partition.
executionId - specifies the job execution to stop.
The job execution must be running.NoSuchJobExecutionExceptionJobExecutionNotRunningExceptionJobSecurityExceptionvoid abandon(long executionId)
throws NoSuchJobExecutionException,
JobExecutionIsRunningException,
JobSecurityException
Note that ABANDONED executions cannot be restarted.
executionId - specifies the job execution to abandon.NoSuchJobExecutionExceptionJobExecutionIsRunningExceptionJobSecurityExceptionJobInstance getJobInstance(long executionId) throws NoSuchJobExecutionException, JobSecurityException
executionId - specifies the job execution.NoSuchJobExecutionExceptionJobSecurityExceptionList<JobExecution> getJobExecutions(JobInstance instance) throws NoSuchJobInstanceException, JobSecurityException
instance - specifies the job instance.NoSuchJobInstanceExceptionJobSecurityExceptionJobExecution getJobExecution(long executionId) throws NoSuchJobExecutionException, JobSecurityException
executionId - specifies the job execution.NoSuchJobExecutionExceptionJobSecurityExceptionList<StepExecution> getStepExecutions(long jobExecutionId) throws NoSuchJobExecutionException, JobSecurityException
jobExecutionId - specifies the job execution.NoSuchJobExecutionExceptionJobSecurityExceptionCopyright © 2017 JBoss by Red Hat. All rights reserved.