Package io.deephaven.engine.updategraph
Class WaitNotification
java.lang.Object
io.deephaven.engine.updategraph.AbstractNotification
io.deephaven.engine.updategraph.WaitNotification
- All Implemented Interfaces:
LogOutputAppendable
,NotificationQueue.Notification
,IntrusiveDoublyLinkedNode<NotificationQueue.Notification>
,Runnable
One-shot
NotificationQueue.Notification
that can be delivered when a set of
dependencies
are satisfied. This allows for an external observer to wait for
multiple dependencies to be satisfied using waitForSatisfaction(long, NotificationQueue.Dependency...)
.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.util.datastructures.linked.IntrusiveDoublyLinkedNode
IntrusiveDoublyLinkedNode.Adapter<NODE_TYPE extends IntrusiveDoublyLinkedNode<NODE_TYPE>>, IntrusiveDoublyLinkedNode.Impl<NODE_TYPE extends IntrusiveDoublyLinkedNode.Impl<NODE_TYPE>>
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canExecute
(long step) Can this notification be executed? That is, are all of it's dependencies satisfied.void
run()
static boolean
waitForSatisfaction
(long step, @NotNull NotificationQueue.Dependency... dependencies) Wait for all the specified dependencies to be satisfied on the specified step.Methods inherited from class io.deephaven.engine.updategraph.AbstractNotification
getNext, getPrev, isTerminal, mustExecuteWithUpdateGraphLock, setNext, setPrev, toString
-
Method Details
-
canExecute
public boolean canExecute(long step) Description copied from interface:NotificationQueue.Notification
Can this notification be executed? That is, are all of it's dependencies satisfied.- Parameters:
step
- The step for which we are testing satisfaction- Returns:
- true if this notification can be executed, false if it has unmet dependencies
-
append
- Specified by:
append
in interfaceLogOutputAppendable
- Overrides:
append
in classAbstractNotification
-
run
public void run() -
waitForSatisfaction
public static boolean waitForSatisfaction(long step, @NotNull @NotNull NotificationQueue.Dependency... dependencies) Wait for all the specified dependencies to be satisfied on the specified step.- Parameters:
step
- The step to wait for satisfaction ondependencies
- The dependencies to wait for- Returns:
- True if the dependencies became satisfied on the specified step, false if the cycle had already completed
-