Class CreateJob

java.lang.Object
uk.ac.manchester.spinnaker.alloc.client.CreateJob

public final class CreateJob
extends Object
A request to create a job.
Author:
Donal Fellows
  • Field Details

  • Constructor Details

    • CreateJob

      public CreateJob()
      Create a request to run on a single board using the default machine operated by the Spalloc service.

      Note that you can configure this request further.

    • CreateJob

      public CreateJob​(int numBoards)
      Create a request to run on a number of boards using the default machine operated by the Spalloc service.

      Note that you can configure this request further.

      Parameters:
      numBoards - The number of boards to ask for.
      Throws:
      IllegalArgumentException - If the number of boards is less than 1
    • CreateJob

      public CreateJob​(int width, int height)
      Create a request to run on rectangle of triads of boards using the default machine operated by the Spalloc service.

      Note that you can configure this request further.

      Parameters:
      width - The width of the rectangle, in triads
      height - The height of the rectangle, in triads
      Throws:
      IllegalArgumentException - If either of the dimensions is less than 1
    • CreateJob

      public CreateJob​(String machine, TriadCoords triad)
      Create a request to run on a specific board of a specific machine operated by the Spalloc service.

      Note that you can configure this request further.

      Parameters:
      machine - Which machine of the service to use?
      triad - Which board of the machine to request? This is the logical coordinates.
    • CreateJob

      public CreateJob​(String machine, PhysicalCoords coords)
      Create a request to run on a specific board of a specific machine operated by the Spalloc service.

      Note that you can configure this request further.

      Parameters:
      machine - Which machine of the service to use?
      coords - The physical coordinates of the board to request.
    • CreateJob

      public CreateJob​(String machine, String ipAddress)
      Create a request to run on a specific board of a specific machine operated by the Spalloc service.

      Note that you can configure this request further.

      Parameters:
      machine - Which machine of the service to use?
      ipAddress - The IP address of the board of the machine to request
  • Method Details

    • getKeepaliveInterval

      public Duration getKeepaliveInterval()
      Returns:
      How long after a keepalive message will the job be auto-deleted? Required. Must be between 30 and 300 seconds.
    • setKeepaliveInterval

      public void setKeepaliveInterval​(Duration keepaliveInterval)
      Parameters:
      keepaliveInterval - How long after a keepalive message will the job be auto-deleted? Required. Must be between 30 and 300 seconds.
    • getNumBoards

      public Integer getNumBoards()
      Returns:
      The number of boards to request. May be null if a different type of request is made.
    • setNumBoards

      public void setNumBoards​(Integer numBoards)
      Parameters:
      numBoards - The number of boards to request.
    • getDimensions

      public CreateJob.Dimensions getDimensions()
      Returns:
      The size of rectangle of boards to request.
    • setDimensions

      public void setDimensions​(CreateJob.Dimensions dimensions)
      Parameters:
      dimensions - The size of rectangle of boards to request.
    • getBoard

      public CreateJob.SpecificBoard getBoard()
      Returns:
      The address of the specific board to request.
    • setBoard

      public void setBoard​(CreateJob.SpecificBoard board)
      Parameters:
      board - The address of the specific board to request.
    • getMachineName

      public String getMachineName()
      Returns:
      Which machine to allocate on. This and tags are mutually exclusive, but at least one must be given.
    • setMachineName

      public void setMachineName​(String machineName)
      Parameters:
      machineName - Which machine to allocate on. This and tags are mutually exclusive, but at least one must be given.
    • getTags

      public List<String> getTags()
      Returns:
      The tags to select which machine to allocate on. This and machineName are mutually exclusive, but at least one must be given.
    • setTags

      public void setTags​(List<String> tags)
      Parameters:
      tags - The tags to select which machine to allocate on. This and machineName are mutually exclusive, but at least one must be given.
    • getMaxDeadBoards

      public Integer getMaxDeadBoards()
      Returns:
      The maximum number of dead boards allowed in a rectangular allocation. Note that the allocation engine might increase this if it decides to overallocate.
    • setMaxDeadBoards

      public void setMaxDeadBoards​(Integer maxDeadBoards)
      Parameters:
      maxDeadBoards - The maximum number of dead boards allowed in a rectangular allocation. Note that the allocation engine might increase this if it decides to overallocate.
    • getOwner

      public String getOwner()
      Returns:
      The owner; only works when the user is admin or NMPI.
    • setOwner

      public void setOwner​(String owner)
      Set the owner of the job to something other than the user requesting. Only works when the user has this permission.
      Parameters:
      owner - The new owner.
    • getGroup

      public String getGroup()
      Returns:
      The group the quota for the job should be allocated against.
    • setGroup

      public void setGroup​(String group)
      Parameters:
      group - The group the quota for the job should be allocated against.
    • getNmpiCollab

      public String getNmpiCollab()
      Returns:
      The collaboratory that the quota for the job should be allocated against.
    • setNmpiCollab

      public void setNmpiCollab​(String nmpiCollab)
      Parameters:
      nmpiCollab - The collaboratory that the quota for the job should be allocated against.
    • getNmpiJobId

      public Integer getNmpiJobId()
      Returns:
      The NMPI job that the quota should be allocated against.
    • setNmpiJobId

      public void setNmpiJobId​(Integer nmpiJobId)
      Parameters:
      nmpiJobId - The NMPI job that the quota should be allocated against.