Interface SpallocClient.Machine
- Enclosing interface:
- SpallocClient
public static interface SpallocClient.Machine
The services offered relating to a Spalloc machine.
-
Method Summary
Modifier and TypeMethodDescriptiongetBoard
(@NotNull @Valid PhysicalCoords coords) Given physical coordinates, return more info about a board.getBoard
(@NotNull @Valid TriadCoords coords) Given logical triad coordinates, return more info about a board.getBoard
(@NotNull @Valid HasChipLocation chip) Given a global chip location, return more info about the board that contains it.getBoard
(@IPAddress String address) Given an IP address, return more info about a board.What boards in the machine are dead?What links in the machine are dead?int
The height of the machine.int
The number of live boards.getName()
The machine's name.getTags()
The tags of the machine.int
getWidth()
The width of the machine.void
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, IOException Given 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, IOException Given 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, IOException Given 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
-