public interface JobHandle extends StatefulServiceInterface
NOTE: The calling order for the service is as follows:
Job
) or attach(long)close()
does not cancel or otherwise change the Job
state. See cancelJob()
.Modifier and Type | Field and Description |
---|---|
static String |
CANCELLED |
static String |
ERROR |
static String |
FINISHED |
static String |
QUEUED |
static String |
REQUEUED |
static String |
RESUBMITTED |
static String |
RUNNING |
static String |
SUBMITTED |
static String |
WAITING |
Modifier and Type | Method and Description |
---|---|
JobStatus |
attach(long jobId) |
void |
cancelJob()
Marks a job for cancellation.
|
Job |
getJob() |
boolean |
jobError()
Returns true if the
Job has thrown an error. |
Timestamp |
jobFinished() |
String |
jobMessage() |
boolean |
jobRunning()
|
JobStatus |
jobStatus() |
String |
setMessage(String message)
Sets the job's message string, and returns the previous value.
|
String |
setStatus(String status)
Updates the
JobStatus for the current job. |
String |
setStatusAndMessage(String status,
String message)
Like
setStatus(String) but also sets the message. |
long |
submit(Job job)
Submits a
Job and returns its database id. |
activate, close, getCurrentEventContext, passivate
static final String SUBMITTED
static final String RESUBMITTED
static final String QUEUED
static final String REQUEUED
static final String RUNNING
static final String ERROR
static final String WAITING
static final String FINISHED
static final String CANCELLED
long submit(Job job)
Job
and returns its database id. The only fields
directly on status which are editable are message,
scheduledFor and status. The latter two must be
sensible.job
- Not nullJobStatus attach(long jobId) throws ApiUsageException
JobStatus
for the id
ApiUsageException
- if the id
does not exist.Timestamp jobFinished()
String jobMessage()
boolean jobRunning()
boolean jobError()
Job
has thrown an error.void cancelJob()
String setStatus(String status)
JobStatus
for the current job. The previous status
is returned as a string. If the status is CANCELLED
, this
method is equivalent to cancelJob()
.String setStatusAndMessage(String status, String message)
setStatus(String)
but also sets the message.
Version: 5.3.3-ice35-b63
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.