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 final int
    Job has terminated, see the reason property for why.
    static final int
    Job is having its boards powered up.
    static final int
    Job is in the queue, awaiting allocation.
    static final int
    Job is running (or at least ready to run).
    static final int
    Job is unknown.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Get the number of seconds to keep alive.
    Get the power state of the job.
    Get the reason for the job being destroyed.
    int
    Get the state of the job in the queue.
    void
    setKeepAlive(double keepAlive)
    Set the number of seconds to keep alive.
    void
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • UNKNOWN

      public static final int UNKNOWN
      Job is unknown.
      See Also:
    • QUEUED

      public static final int QUEUED
      Job is in the queue, awaiting allocation.
      See Also:
    • POWER

      public static final int POWER
      Job is having its boards powered up.
      See Also:
    • READY

      public static final int READY
      Job is running (or at least ready to run).
      See Also:
    • DESTROYED

      public static final int DESTROYED
      Job has terminated, see the reason property for why.
      See Also:
  • 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

      public Boolean getPower()
      Get the power state of the job.
      Returns:
      True if on, False if off
    • setPower

      public void setPower(Boolean power)
      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

      public String getReason()
      Get the reason for the job being destroyed.
      Returns:
      The reason
    • setReason

      public void setReason(String reason)
      Set the reason for the job being destroyed.
      Parameters:
      reason - The reason to set.