Class JobDescription.Builder

java.lang.Object
uk.ac.manchester.spinnaker.spalloc.messages.JobDescription.Builder
Enclosing class:
JobDescription

public static class JobDescription.Builder
extends Object
Builder for JobDescription.
  • Constructor Details

  • Method Details

    • setJobID

      public void setJobID​(int jobID)
      Parameters:
      jobID - The job's identifier.
    • setOwner

      public void setOwner​(String owner)
      Parameters:
      owner - The job's owner.
    • setStartTime

      public void setStartTime​(Double startTime)
      Parameters:
      startTime - When the job started, in seconds from the epoch.
    • setState

      public void setState​(State state)
      Parameters:
      state - The job state.
    • setPower

      public void setPower​(Boolean power)
      Parameters:
      power - Whether the job's allocated boards are powered on.
    • setKeepAlive

      public void setKeepAlive​(double keepAlive)
      Parameters:
      keepAlive - The job's maximum keepalive interval, in seconds.
    • setReason

      public void setReason​(String reason)
      Parameters:
      reason - The reason why the job terminated.
    • setMachine

      public void setMachine​(String machine)
      Parameters:
      machine - The name of the machine that the job is allocated to.
    • setArgs

      public void setArgs​(List<Integer> args)
      Parameters:
      args - The positional arguments used to create the job.
    • setKwargs

      public void setKwargs​(Map<String,​Object> kwargs)
      Parameters:
      kwargs - The keyword arguments used to create the job.
    • setBoards

      public void setBoards​(List<BoardCoordinates> boards)
      Parameters:
      boards - The boards allocated to the job and their locations.
    • setKeepAliveHost

      public void setKeepAliveHost​(String keepAliveHost)
      Parameters:
      keepAliveHost - The host believed to be keeping the job alive.
    • build

      public JobDescription build()
      Build an instance of the immutable JobDescription.
      Returns:
      The instance.