Class Epochs.Epoch

java.lang.Object
uk.ac.manchester.spinnaker.alloc.allocator.Epochs.Epoch
Enclosing class:
Epochs

public final class Epochs.Epoch extends Object
A waitable epoch checkpoint.
Author:
Donal Fellows, Andrew Rowley
  • Method Details

    • waitForChange

      public boolean waitForChange(Duration timeout) throws InterruptedException
      Wait, for up to timeout, for a change.
      Parameters:
      timeout - The time to wait, in milliseconds.
      Returns:
      Whether the item has changed or not.
      Throws:
      InterruptedException - If the wait is interrupted.
    • getChanged

      public Collection<Integer> getChanged(Duration timeout) throws InterruptedException
      Get the set of changed items.
      Parameters:
      timeout - The timeout to wait for one item to change.
      Returns:
      The changed items.
      Throws:
      InterruptedException - If the wait is interrupted.
    • isValid

      public boolean isValid()
      Check if this epoch is the current one.
      Returns:
      Whether this is a valid epoch.