|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface JobOperator
Low level interface for inspecting and controlling jobs with access only to primitive and collection types. Suitable for a command-line client (e.g. that launches a new process for each operation), or a remote launcher like a JMX console.
| Method Summary | |
|---|---|
java.util.List<java.lang.Long> |
getExecutions(long instanceId)
List the JobExecutions associated with a particular
JobInstance, in reverse order of creation (and therefore usually
of execution). |
java.util.List<java.lang.Long> |
getJobInstances(java.lang.String jobName,
int start,
int count)
List the JobInstances for a given job name, in
reverse order of creation (and therefore usually of first execution). |
java.util.Set<java.lang.String> |
getJobNames()
List the available job names that can be launched with start(String, String). |
java.lang.String |
getParameters(long executionId)
Get the JobParameters as an easily readable String. |
java.util.Set<java.lang.Long> |
getRunningExecutions(java.lang.String jobName)
Get the id values of all the running JobExecutions
with the given job name. |
java.util.Map<java.lang.Long,java.lang.String> |
getStepExecutionSummaries(long executionId)
Summarise the StepExecution instances belonging to the
JobExecution with the supplied id, giving details of status,
start and end times etc. |
java.lang.String |
getSummary(long executionId)
Summarise the JobExecution with the supplied id, giving details
of status, start and end times etc. |
java.lang.Long |
restart(long executionId)
Restart a failed or stopped JobExecution. |
java.lang.Long |
start(java.lang.String jobName,
java.lang.String parameters)
Start a new instance of a job with the parameters specified. |
java.lang.Long |
startNextInstance(java.lang.String jobName)
Launch the next in a sequence of JobInstance determined by the
JobParametersIncrementer attached to the specified job. |
boolean |
stop(long executionId)
Send a stop signal to the JobExecution with the supplied id. |
| Method Detail |
|---|
java.util.List<java.lang.Long> getExecutions(long instanceId)
throws NoSuchJobInstanceException
JobExecutions associated with a particular
JobInstance, in reverse order of creation (and therefore usually
of execution).
instanceId - the id of a JobInstance
JobExecutions
associated with this instance
NoSuchJobInstanceException
java.util.List<java.lang.Long> getJobInstances(java.lang.String jobName,
int start,
int count)
throws NoSuchJobException
JobInstances for a given job name, in
reverse order of creation (and therefore usually of first execution).
jobName - the job name that all the instances havestart - the start index of the instancescount - the maximum number of values to return
JobInstances
NoSuchJobException
java.util.Set<java.lang.Long> getRunningExecutions(java.lang.String jobName)
throws NoSuchJobException
JobExecutions
with the given job name.
jobName - the name of the job to search under
JobExecution instances
NoSuchJobException - if there are no JobExecutions with that job name
java.lang.String getParameters(long executionId)
throws NoSuchJobExecutionException
JobParameters as an easily readable String.
executionId - the id of an existing JobExecution
NoSuchJobExecutionException - if the id was not associated with any
JobExecution
java.lang.Long start(java.lang.String jobName,
java.lang.String parameters)
throws NoSuchJobException,
JobInstanceAlreadyExistsException
jobName - the name of the Job to launchparameters - the parameters to launch it with (comma or newline
separated name=value pairs)
JobExecution that is launched
NoSuchJobException - if there is no Job with the specified
name
JobInstanceAlreadyExistsException - if a job instance with this
name and parameters already exists
java.lang.Long restart(long executionId)
throws JobInstanceAlreadyCompleteException,
NoSuchJobExecutionException,
NoSuchJobException,
JobRestartException
JobExecution. Fails with an exception
if the id provided does not exist or corresponds to a JobInstance
that in normal circumstances already completed successfully.
executionId - the id of a failed or stopped JobExecution
JobExecution that was started
JobInstanceAlreadyCompleteException - if the job was already
successfully completed
NoSuchJobExecutionException - if the id was not associated with any
JobExecution
NoSuchJobException - if the JobExecution was found, but its
corresponding Job is no longer available for launching
JobRestartException - if there is a non-specific error with the
restart (e.g. corrupt or inconsistent restart data)
java.lang.Long startNextInstance(java.lang.String jobName)
throws NoSuchJobException,
JobParametersNotFoundException,
JobRestartException,
JobExecutionAlreadyRunningException,
JobInstanceAlreadyCompleteException
JobInstance determined by the
JobParametersIncrementer attached to the specified job. If the
previous instance is still in a failed state, this method should still
create a new instance and run it with different parameters (as long as
the JobParametersIncrementer is working).
jobName - the name of the job to launch
JobExecution id of the execution created when the job
is launched
NoSuchJobException - if there is no such job definition available
JobParametersNotFoundException - if the parameters cannot be found
UnexpectedJobExecutionException - if an unexpected condition arises
JobRestartException
JobExecutionAlreadyRunningException
JobInstanceAlreadyCompleteException
boolean stop(long executionId)
throws NoSuchJobExecutionException,
JobExecutionNotRunningException
JobExecution with the supplied id. The
signal is successfully sent if this method returns true, but that doesn't
mean that the job has stopped. The only way to be sure of that is to poll
the job execution status.
executionId - the id of a running JobExecution
NoSuchJobExecutionException - if there is no JobExecution
with the id supplied
JobExecutionNotRunningException - if the JobExecution is
not running (so cannot be stopped)
java.lang.String getSummary(long executionId)
throws NoSuchJobExecutionException
JobExecution with the supplied id, giving details
of status, start and end times etc.
executionId - the id of an existing JobExecution
NoSuchJobExecutionException - if there is no JobExecution
with the supplied id
java.util.Map<java.lang.Long,java.lang.String> getStepExecutionSummaries(long executionId)
throws NoSuchJobExecutionException
StepExecution instances belonging to the
JobExecution with the supplied id, giving details of status,
start and end times etc.
executionId - the id of an existing JobExecution
NoSuchJobExecutionException - if there is no JobExecution
with the supplied idjava.util.Set<java.lang.String> getJobNames()
start(String, String).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||