Class Epochs
java.lang.Object
uk.ac.manchester.spinnaker.alloc.allocator.Epochs
Manages waiting for values.
- Author:
- Donal Fellows, Andrew Rowley
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidblacklistChanged(int board) Indicate a change in a blacklist.getBlacklistEpoch(int boardId) Get a blacklist epoch for a board.getJobsEpoch(int jobId) Get a job epoch for a job.getJobsEpoch(List<Integer> jobIds) Get a job epoch for a list of jobs.getMachineEpoch(int machineId) Get a machine epoch for a machine.getMachinesEpoch(List<Integer> machineIds) Get a machine epoch for a set of machines.voidjobChanged(int job) Indicate a change in a job.voidmachineChanged(int machine) Indicate a change in a machine.
-
Constructor Details
-
Epochs
public Epochs()
-
-
Method Details
-
getJobsEpoch
Get a job epoch for a job.- Parameters:
jobId- The job identifier.- Returns:
- The epoch handle.
-
getJobsEpoch
Get a job epoch for a list of jobs.- Parameters:
jobIds- The job identifiers.- Returns:
- The epoch handle.
-
jobChanged
public void jobChanged(int job) Indicate a change in a job. Will wake any thread waiting on changes to the job epoch withwaitForChange()on aEpochhandle.- Parameters:
job- The job that has changed
-
getMachineEpoch
Get a machine epoch for a machine.- Parameters:
machineId- The identifier of the machine.- Returns:
- The epoch handle.
-
getMachinesEpoch
Get a machine epoch for a set of machines.- Parameters:
machineIds- The identifiers of the machine.- Returns:
- The epoch handle.
-
machineChanged
public void machineChanged(int machine) Indicate a change in a machine. Will wake any thread waiting on changes to the machine epoch withwaitForChange()on aEpochhandle.- Parameters:
machine- The machine that has changed
-
getBlacklistEpoch
Get a blacklist epoch for a board.- Parameters:
boardId- The id of the board.- Returns:
- The epoch handle.
-
blacklistChanged
public void blacklistChanged(int board) Indicate a change in a blacklist. Will wake any thread waiting on changes to the blacklist epoch withwaitForChange()on aEpochhandle.- Parameters:
board- The board that has changed.
-