org.clazzes.util.sched.impl
public class JobStatusServiceImpl extends Object implements IJobStatusService
Constructor and Description |
---|
JobStatusServiceImpl() |
Modifier and Type | Method and Description |
---|---|
JobStatusDTO |
cancelJob(UUID jobId)
Cancel the job with the given ID.
|
JobStatusDTO |
getJobStatus(UUID jobId) |
IOneTimeScheduler |
getOneTimeScheduler() |
boolean |
isAllowCancelTimedJob() |
void |
setAllowCancelTimedJob(boolean allowCancelTimedJob) |
void |
setOneTimeScheduler(IOneTimeScheduler oneTimeScheduler) |
JobStatusDTO |
waitForJob(UUID jobId,
long timeout) |
public JobStatusDTO getJobStatus(UUID jobId)
getJobStatus
in interface IJobStatusService
jobId
- The ID of a long running-job, which is returned
as result of a POST request in the form
JOB_UUID=<jobId>
null
is returned, the job is not known, or the status
of the job has expired.public JobStatusDTO waitForJob(UUID jobId, long timeout)
waitForJob
in interface IJobStatusService
jobId
- The ID of a long running-job, which is returned
as result of a POST request in the form
JOB_UUID=<jobId>
timeout
- The number of milliseconds to wait for the termination of the job.null
is returned, the job is not known, or the status
of the job has expired.public JobStatusDTO cancelJob(UUID jobId)
IJobStatusService
cancelJob
in interface IJobStatusService
jobId
- The ID of a long running-job, which is returned
as result of a POST request in the form
JOB_UUID=<jobId>
null
is returned, the job is not known, or the status
of the job has expired.public IOneTimeScheduler getOneTimeScheduler()
public void setOneTimeScheduler(IOneTimeScheduler oneTimeScheduler)
oneTimeScheduler
- The one time scheduler to use.public boolean isAllowCancelTimedJob()
public void setAllowCancelTimedJob(boolean allowCancelTimedJob)
allowCancelTimedJob
- Set whether cancelling of timed jobs
is allowed.Copyright © 2014 Clazzes.org. All Rights Reserved.