Interface SpallocClient.Machine
- Enclosing interface:
- SpallocClient
public static interface SpallocClient.Machine
The services offered relating to a Spalloc machine.
-
Method Summary
Modifier and Type Method Description WhereIs
getBoard(@NotNull @Valid PhysicalCoords coords)
Given physical coordinates, return more info about a board.WhereIs
getBoard(@NotNull @Valid TriadCoords coords)
Given logical triad coordinates, return more info about a board.WhereIs
getBoard(@NotNull @Valid HasChipLocation chip)
Given a global chip location, return more info about the board that contains it.WhereIs
getBoard(@IPAddress String address)
Given an IP address, return more info about a board.List<BoardCoords>
getDeadBoards()
What boards in the machine are dead?List<DeadLink>
getDeadLinks()
What links in the machine are dead? Only links where both boards are alive.int
getHeight()
The height of the machine.int
getLiveBoardCount()
The number of live boards.String
getName()
The machine's name.List<String>
getTags()
The tags of the machine.int
getWidth()
The width of the machine.void
waitForChange()
Wait (for up to 30 seconds) until the state of the machine might have changed.
-
Method Details
-
getName
String getName()The machine's name. Never empty, nevernull
.- Returns:
- The name of the machine.
-
getTags
The tags of the machine. If this includes "default
", this is the machine that jobs will usually go to.- Returns:
- The tags of the machine.
-
getWidth
int getWidth()The width of the machine.- Returns:
- The width of the machine, in triads.
-
getHeight
int getHeight()The height of the machine.- Returns:
- The height of the machine, in triads.
-
getLiveBoardCount
int getLiveBoardCount()The number of live boards.- Returns:
- The (estimated) number of live boards in the machine.
-
getDeadBoards
List<BoardCoords> getDeadBoards()What boards in the machine are dead?- Returns:
- The dead boards of the machine.
-
getDeadLinks
What links in the machine are dead? Only links where both boards are alive.- Returns:
- The dead links of the machine.
-
waitForChange
Wait (for up to 30 seconds) until the state of the machine might have changed.- Throws:
IOException
- If communication with the server fails
-
getBoard
WhereIs getBoard(@NotNull @Valid @NotNull @Valid TriadCoords coords) throws FileNotFoundException, IOExceptionGiven logical triad coordinates, return more info about a board.- Parameters:
coords
- Triad coordinates- Returns:
- Board information
- Throws:
FileNotFoundException
- If the board doesn't exist.IOException
- If communication with the server fails
-
getBoard
WhereIs getBoard(@NotNull @Valid @NotNull @Valid PhysicalCoords coords) throws FileNotFoundException, IOExceptionGiven physical coordinates, return more info about a board.- Parameters:
coords
- Physical coordinates.- Returns:
- Board information
- Throws:
FileNotFoundException
- If the board doesn't exist.IOException
- If communication with the server fails
-
getBoard
WhereIs getBoard(@NotNull @Valid @NotNull @Valid HasChipLocation chip) throws FileNotFoundException, IOExceptionGiven a global chip location, return more info about the board that contains it.- Parameters:
chip
- The chip location- Returns:
- Board information
- Throws:
FileNotFoundException
- If the board doesn't exist.IOException
- If communication with the server fails
-
getBoard
Given an IP address, return more info about a board.- Parameters:
address
- Board IP address- Returns:
- Board information
- Throws:
FileNotFoundException
- If the board doesn't exist.IOException
- If communication with the server fails
-