Class JobDescription

java.lang.Object
uk.ac.manchester.spinnaker.alloc.model.JobDescription

public class JobDescription
extends Object
Descriptive detail for a job. Used for HTML generation, something like:
         Job ID: 6037654
          Owner: gorp
          State: ready
Start time: 11/07/2021 13:04:43
Keepalive: 60 seconds
Owner host: 192.168.0.33
        Request: Job(1)
Allocation:  ___
                         / . \
                         \___/
Hostname: 10.11.12.13
          Width: 8
         Height: 8
Num boards: 1
Board power: on
Running on: SpiNNaker1M
 
(That's actually slightly edited output from spalloc-job -info)
  • Constructor Details

  • Method Details

    • getId

      public int getId()
      Returns:
      the machine ID
    • setId

      public void setId​(int id)
      Parameters:
      id - the machine ID
    • getOwner

      public Optional<String> getOwner()
      Returns:
      the job's owner
    • setOwner

      public void setOwner​(String owner)
      Parameters:
      owner - the job's owner
    • getState

      public JobState getState()
      Returns:
      the job's state
    • setState

      public void setState​(JobState state)
      Parameters:
      state - the job's state
    • getStartTime

      public Instant getStartTime()
      Returns:
      when the job started
    • setStartTime

      public void setStartTime​(Instant startTime)
      Parameters:
      startTime - when the job started
    • getKeepAlive

      public Duration getKeepAlive()
      Returns:
      the maximum keepalive interval
    • setKeepAlive

      public void setKeepAlive​(Duration keepAlive)
      Parameters:
      keepAlive - the maximum keepalive interval
    • getOwnerHost

      public Optional<String> getOwnerHost()
      Returns:
      the owner's host (the one supplying keepalives)
    • setOwnerHost

      public void setOwnerHost​(String ownerHost)
      Parameters:
      ownerHost - the owner's host (the one supplying keepalives)
    • getRequest

      public String getRequest()
      Returns:
      the request
    • setRequest

      public void setRequest​(String request)
      Parameters:
      request - the request
    • getWidth

      public Optional<Integer> getWidth()
      Returns:
      the width of the allocation in chips, or empty() if the job is not allocated.
    • setWidth

      public void setWidth​(int width)
      Parameters:
      width - the width of the allocation in chips.
    • getHeight

      public Optional<Integer> getHeight()
      Returns:
      the height of the allocation in chips, or empty() if the job is not allocated.
    • setHeight

      public void setHeight​(int height)
      Parameters:
      height - the height of the allocation in chips.
    • isPowered

      public boolean isPowered()
      Returns:
      whether all boards are powered up; unallocated jobs are considered unpowered.
    • setPowered

      public void setPowered​(boolean powered)
      Parameters:
      powered - whether all boards are powered up; unallocated jobs are considered unpowered.
    • getMachine

      public String getMachine()
      Returns:
      the machine name
    • setMachine

      public void setMachine​(String machine)
      Parameters:
      machine - the machine name
    • getBoards

      public List<BoardCoords> getBoards()
      Returns:
      the board coordinates of all boards allocated to the job
    • setBoards

      public void setBoards​(List<BoardCoords> boards)
      Parameters:
      boards - the board coordinates of all boards allocated to the job
    • getMachineUrl

      public URI getMachineUrl()
      Returns:
      the URL to get machine information
    • setMachineUrl

      public void setMachineUrl​(URI machineUrl)
      Parameters:
      machineUrl - the URL to get machine information
    • getRequestBytes

      public byte[] getRequestBytes()
      Returns:
      The serialized request. Needs to be processed to hand out of getRequest().
    • setRequestBytes

      public void setRequestBytes​(byte[] bytes)
      Parameters:
      bytes - The serialized request.
    • getTriadWidth

      public int getTriadWidth()
      Returns:
      The width of the allocation in triads. 0 if not yet allocated.
    • getTriadHeight

      public int getTriadHeight()
      Returns:
      The height of the allocation in triads. 0 if not yet allocated.