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 the reason 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.

    Methods inherited from class java.lang.Object

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

  • Constructor Details

  • 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.