Interface JobStatus
-
public interface JobStatus
JobStatus contains status information for a specific job.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description XenonException
getException()
Get the exception produced by the Job or while retrieving the status.java.lang.Integer
getExitCode()
Get the exit code for the Job.java.lang.String
getJobIdentifier()
Get the job identifier of the Job for which this JobStatus was created.java.lang.String
getName()
Get the name of the Job for which this JobStatus was created.java.util.Map<java.lang.String,java.lang.String>
getSchedulerSpecificInformation()
Get scheduler specific information on the Job.java.lang.String
getState()
Get the state of the Job.boolean
hasException()
Has the Job or job retrieval produced a exception ?boolean
isDone()
Is the Job done.boolean
isRunning()
Is the Job running.void
maybeThrowException()
Throws the exception produced by the Job or while retrieving the status, if it exists.
-
-
-
Method Detail
-
getJobIdentifier
java.lang.String getJobIdentifier()
Get the job identifier of the Job for which this JobStatus was created.- Returns:
- the identifier of the Job.
-
getName
java.lang.String getName()
Get the name of the Job for which this JobStatus was created.- Returns:
- the name of the Job.
-
getState
java.lang.String getState()
Get the state of the Job. The state is a scheduler specific string, generally intended to be human readable. Very different state strings can be returned depending on which scheduler is used. Therefore, this method should only be used to provide feedback to the user. To programmatically inspect the state of the job use {isRunning()
,isDone()
orhasException()
instead.- Returns:
- the state of the Job.
-
getExitCode
java.lang.Integer getExitCode()
Get the exit code for the Job.- Returns:
- the exit code for the Job.
-
getException
XenonException getException()
Get the exception produced by the Job or while retrieving the status. If no exception occurred,null
will be returned. SeemaybeThrowException()
for the possible exceptions.- Returns:
- the exception.
-
maybeThrowException
void maybeThrowException() throws XenonException
Throws the exception produced by the Job or while retrieving the status, if it exists. Otherwise continue.- Throws:
nl.esciencecenter.xenon.adaptors.schedulers.JobCanceledException
- if the job was cancelledNoSuchJobException
- if the job of which the status was requested does not existXenonException
- if an I/O error occurred.
-
isRunning
boolean isRunning()
Is the Job running.- Returns:
- if the Job is running.
-
isDone
boolean isDone()
Is the Job done.- Returns:
- if the Job is done.
-
hasException
boolean hasException()
Has the Job or job retrieval produced a exception ?- Returns:
- if the Job has an exception.
-
getSchedulerSpecificInformation
java.util.Map<java.lang.String,java.lang.String> getSchedulerSpecificInformation()
Get scheduler specific information on the Job.- Returns:
- scheduler specific information on the Job.
-
-