Class Epochs
java.lang.Object
uk.ac.manchester.spinnaker.alloc.allocator.Epochs
@Service public class Epochs extends Object
Manages waiting for values.
- Author:
- Donal Fellows, Andrew Rowley
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
Epochs.Epoch
A waitable epoch checkpoint. -
Constructor Summary
Constructors Constructor Description Epochs()
-
Method Summary
Modifier and Type Method Description void
blacklistChanged(int board)
Indicate a change in a blacklist.Epochs.Epoch
getBlacklistEpoch(int boardId)
Get a blacklist epoch for a board.Epochs.Epoch
getJobsEpoch(int jobId)
Get a job epoch for a job.Epochs.Epoch
getJobsEpoch(List<Integer> jobIds)
Get a job epoch for a list of jobs.Epochs.Epoch
getMachineEpoch(int machineId)
Get a machine epoch for a machine.Epochs.Epoch
getMachinesEpoch(List<Integer> machineIds)
Get a machine epoch for a set of machines.void
jobChanged(int job)
Indicate a change in a job.void
machineChanged(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 aEpoch
handle.- 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 aEpoch
handle.- 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 aEpoch
handle.- Parameters:
board
- The board that has changed.
-