Class JobDescription
java.lang.Object
uk.ac.manchester.spinnaker.alloc.model.JobDescription
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getId()
getOwner()
byte[]
getState()
int
int
getWidth()
boolean
void
setBoards
(List<BoardCoords> boards) void
setHeight
(int height) void
setId
(int id) void
setKeepAlive
(Duration keepAlive) void
setMachine
(String machine) void
setMachineUrl
(URI machineUrl) void
void
setOwnerHost
(String ownerHost) void
setPowered
(boolean powered) void
setRequest
(String request) void
setRequestBytes
(byte[] bytes) void
setStartTime
(Instant startTime) void
void
setWidth
(int width)
-
Constructor Details
-
JobDescription
public JobDescription()
-
-
Method Details
-
getId
public int getId()- Returns:
- the machine ID
-
setId
public void setId(int id) - Parameters:
id
- the machine ID
-
getOwner
- Returns:
- the job's owner
-
setOwner
- Parameters:
owner
- the job's owner
-
getState
- Returns:
- the job's state
-
setState
- Parameters:
state
- the job's state
-
getStartTime
- Returns:
- when the job started
-
setStartTime
- Parameters:
startTime
- when the job started
-
getKeepAlive
- Returns:
- the maximum keepalive interval
-
setKeepAlive
- Parameters:
keepAlive
- the maximum keepalive interval
-
getOwnerHost
- Returns:
- the owner's host (the one supplying keepalives)
-
setOwnerHost
- Parameters:
ownerHost
- the owner's host (the one supplying keepalives)
-
getRequest
- Returns:
- the request
-
setRequest
- Parameters:
request
- the request
-
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
- 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
- Returns:
- the machine name
-
setMachine
- Parameters:
machine
- the machine name
-
getBoards
- Returns:
- the board coordinates of all boards allocated to the job
-
setBoards
- Parameters:
boards
- the board coordinates of all boards allocated to the job
-
getMachineUrl
- Returns:
- the URL to get machine information
-
setMachineUrl
- 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.
-