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 Summary
Modifier and Type Method Description Collection<Integer>
getChanged(Duration timeout)
Get the set of changed items.boolean
isValid()
Check if this epoch is the current one.boolean
waitForChange(Duration timeout)
Wait, for up totimeout
, for a change.
-
Method Details
-
waitForChange
Wait, for up totimeout
, 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
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.
-