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
  • Constructor Details

  • Method Details

    • getJobsEpoch

      public Epochs.Epoch getJobsEpoch​(int jobId)
      Get a job epoch for a job.
      Parameters:
      jobId - The job identifier.
      Returns:
      The epoch handle.
    • getJobsEpoch

      public Epochs.Epoch getJobsEpoch​(List<Integer> jobIds)
      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 with waitForChange() on a Epoch handle.
      Parameters:
      job - The job that has changed
    • getMachineEpoch

      public Epochs.Epoch getMachineEpoch​(int machineId)
      Get a machine epoch for a machine.
      Parameters:
      machineId - The identifier of the machine.
      Returns:
      The epoch handle.
    • getMachinesEpoch

      public Epochs.Epoch getMachinesEpoch​(List<Integer> machineIds)
      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 with waitForChange() on a Epoch handle.
      Parameters:
      machine - The machine that has changed
    • getBlacklistEpoch

      public Epochs.Epoch getBlacklistEpoch​(int boardId)
      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 with waitForChange() on a Epoch handle.
      Parameters:
      board - The board that has changed.