Class JobState
java.lang.Object
uk.ac.manchester.spinnaker.nmpi.machinemanager.responses.JobState
public class JobState extends Object
A description of the state of a job, in terms of its state, whether its
boards are powered, the advised keep-alive polling interval and the reason
that the job died (if in the
DESTROYED
state).-
Field Summary
Fields Modifier and Type Field Description static int
DESTROYED
Job has terminated, see thereason
property for why.static int
POWER
Job is having its boards powered up.static int
QUEUED
Job is in the queue, awaiting allocation.static int
READY
Job is running (or at least ready to run).static int
UNKNOWN
Job is unknown. -
Constructor Summary
Constructors Constructor Description JobState()
-
Method Summary
Modifier and Type Method Description double
getKeepAlive()
Get the number of seconds to keep alive.Boolean
getPower()
Get the power state of the job.String
getReason()
Get the reason for the job being destroyed.int
getState()
Get the state of the job in the queue.void
setKeepAlive(double keepAlive)
Set the number of seconds to keep alive.void
setPower(Boolean power)
Set the power state of the job.void
setReason(String reason)
Set the reason for the job being destroyed.void
setState(int state)
Set the state of the job in the queue.
-
Field Details
-
UNKNOWN
public static final int UNKNOWNJob is unknown.- See Also:
- Constant Field Values
-
QUEUED
public static final int QUEUEDJob is in the queue, awaiting allocation.- See Also:
- Constant Field Values
-
POWER
public static final int POWERJob is having its boards powered up.- See Also:
- Constant Field Values
-
READY
public static final int READYJob is running (or at least ready to run).- See Also:
- Constant Field Values
-
DESTROYED
public static final int DESTROYEDJob has terminated, see thereason
property for why.- See Also:
- Constant Field Values
-
-
Constructor Details
-
JobState
public JobState()
-
-
Method Details
-
getState
public int getState()Get the state of the job in the queue.- Returns:
- The state
-
setState
public void setState(int state)Set the state of the job in the queue.- Parameters:
state
- The state to set
-
getPower
Get the power state of the job.- Returns:
- True if on, False if off
-
setPower
Set the power state of the job.- Parameters:
power
- True for on, False for off
-
getKeepAlive
public double getKeepAlive()Get the number of seconds to keep alive.- Returns:
- The number of seconds
-
setKeepAlive
public void setKeepAlive(double keepAlive)Set the number of seconds to keep alive.- Parameters:
keepAlive
- The number of seconds to set
-
getReason
Get the reason for the job being destroyed.- Returns:
- The reason
-
setReason
Set the reason for the job being destroyed.- Parameters:
reason
- The reason to set.
-