Class SpallocJavaMachineManagerImpl
java.lang.Object
uk.ac.manchester.spinnaker.nmpi.machinemanager.SpallocJavaMachineManagerImpl
- All Implemented Interfaces:
- AutoCloseable,- MachineManager
A machine manager that interfaces to the new spalloc service.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()getChipCoordinates(SpinnakerMachine machine, int x, int y) Find a chip on a machine.Gets the machines that this manager allocates from.getNextAvailableMachine(int nBoards, String owner, int jobId) Get the next available machine of a given size.booleanisMachineAvailable(SpinnakerMachine machine) Test if a specific machine is available.voidreleaseMachine(SpinnakerMachine machine) Release an allocated machine.voidsetMachinePower(SpinnakerMachine machine, boolean powerOn) Turn a machine on or off.booleanwaitForMachineStateChange(SpinnakerMachine machine, int waitTime) Wait for the machine's availability to change.
- 
Constructor Details- 
SpallocJavaMachineManagerImplpublic SpallocJavaMachineManagerImpl()
 
- 
- 
Method Details- 
close- Specified by:
- closein interface- AutoCloseable
- Throws:
- Exception
 
- 
getMachinesDescription copied from interface:MachineManagerGets the machines that this manager allocates from.- Specified by:
- getMachinesin interface- MachineManager
- Returns:
- collection of machines
- Throws:
- IOException- if there is communication error.
 
- 
getNextAvailableMachineDescription copied from interface:MachineManagerGet the next available machine of a given size.- Specified by:
- getNextAvailableMachinein interface- MachineManager
- Parameters:
- nBoards- The (minimum) number of boards that the machine needs to have.
- owner- The owner of the job.
- jobId- The ID of the NMPI job.
- Returns:
- a machine.
 
- 
isMachineAvailableDescription copied from interface:MachineManagerTest if a specific machine is available.- Specified by:
- isMachineAvailablein interface- MachineManager
- Parameters:
- machine- The machine handle
- Returns:
- true if the machine is available.
 
- 
waitForMachineStateChangeDescription copied from interface:MachineManagerWait for the machine's availability to change.- Specified by:
- waitForMachineStateChangein interface- MachineManager
- Parameters:
- machine- The machine handle
- waitTime- Maximum wait time (in milliseconds)
- Returns:
- Whether the machine state has changed.
 
- 
releaseMachineDescription copied from interface:MachineManagerRelease an allocated machine.- Specified by:
- releaseMachinein interface- MachineManager
- Parameters:
- machine- The machine handle
 
- 
setMachinePowerDescription copied from interface:MachineManagerTurn a machine on or off.- Specified by:
- setMachinePowerin interface- MachineManager
- Parameters:
- machine- The machine handle
- powerOn- True to power a machine on, false to turn it off.
 
- 
getChipCoordinatesDescription copied from interface:MachineManagerFind a chip on a machine.- Specified by:
- getChipCoordinatesin interface- MachineManager
- Parameters:
- machine- The machine handle
- x- The virtual X coordinate of the chip
- y- The virtual Y coordinate of the chip
- Returns:
- The chip location description
 
 
-