Package io.deephaven.engine.context
Class PoisonedUpdateGraph
java.lang.Object
io.deephaven.engine.context.PoisonedUpdateGraph
- All Implemented Interfaces:
LogOutputAppendable
,NotificationQueue
,NotificationQueue.Dependency
,UpdateGraph
,UpdateSourceRegistrar
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.engine.updategraph.NotificationQueue
NotificationQueue.Dependency, NotificationQueue.ErrorNotification, NotificationQueue.Notification
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addNotification
(@NotNull NotificationQueue.Notification notification) Add a notification for this NotificationQueue to deliver (by invoking its run() method).void
addNotifications
(@NotNull Collection<? extends NotificationQueue.Notification> notifications) Enqueue a collection of notifications to be flushed.void
Add a source to this registrar.clock()
boolean
Test if the current thread is involved in processing updates for this UpdateGraph.getName()
boolean
maybeAddNotification
(@NotNull NotificationQueue.Notification notification, long deliveryStep) Add a notification for this NotificationQueue to deliver (by invoking its run() method), iff the delivery step is the current step and the update cycle for that step is still in process.int
Retrieve the number of independent update propagation tasks this UpdateGraph can process concurrently.void
removeSource
(@NotNull Runnable updateSource) Remove a source from this registrar.void
Request that this UpdateGraph process any pending updates as soon as practicable.boolean
satisfied
(long step) Is this ancestor satisfied? Note that this method must be safe to call on any thread.boolean
Test if engine code executing on the current thread should assume safety for serial table operations.boolean
setSerialTableOperationsSafe
(boolean newValue) User or engine code that makes its own determination about the safety of initiating serial table operations on the current thread may use this method to override default behavior.void
stop()
Attempt to stop this update graph, and cease processing further notifications.boolean
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.deephaven.engine.updategraph.NotificationQueue.Dependency
getUpdateGraph
Methods inherited from interface io.deephaven.engine.updategraph.UpdateGraph
allowSerialTableOperations, allowSerialTableOperations, cast, checkInitiateSerialTableOperation, requestSignal
Methods inherited from interface io.deephaven.engine.updategraph.UpdateSourceRegistrar
removeSources
-
Field Details
-
INSTANCE
-
-
Method Details
-
append
- Specified by:
append
in interfaceLogOutputAppendable
-
satisfied
public boolean satisfied(long step) Description copied from interface:NotificationQueue.Dependency
Is this ancestor satisfied? Note that this method must be safe to call on any thread.- Specified by:
satisfied
in interfaceNotificationQueue.Dependency
- Parameters:
step
- The step for which we are testing satisfaction- Returns:
- Whether the dependency is satisfied on
step
(and will not fire subsequent notifications)
-
getUpdateGraph
- Specified by:
getUpdateGraph
in interfaceNotificationQueue.Dependency
- Returns:
- the update graph that this dependency is a part of
-
getName
- Specified by:
getName
in interfaceUpdateGraph
- Returns:
- The name of this UpdateGraph
-
addNotification
Description copied from interface:NotificationQueue
Add a notification for this NotificationQueue to deliver (by invoking its run() method). Note that implementations may have restrictions as to how and when this method may be used for non-terminal notifications, e.g. by only supporting notification queuing from threads that can guarantee they are part of an update cycle.- Specified by:
addNotification
in interfaceNotificationQueue
- Parameters:
notification
- The notification to add
-
addNotifications
public void addNotifications(@NotNull @NotNull Collection<? extends NotificationQueue.Notification> notifications) Description copied from interface:NotificationQueue
Enqueue a collection of notifications to be flushed.- Specified by:
addNotifications
in interfaceNotificationQueue
- Parameters:
notifications
- The notification to enqueue- See Also:
-
maybeAddNotification
public boolean maybeAddNotification(@NotNull @NotNull NotificationQueue.Notification notification, long deliveryStep) Description copied from interface:NotificationQueue
Add a notification for this NotificationQueue to deliver (by invoking its run() method), iff the delivery step is the current step and the update cycle for that step is still in process. This is only supported for non-terminal notifications.- Specified by:
maybeAddNotification
in interfaceNotificationQueue
- Parameters:
notification
- The notification to adddeliveryStep
- The step to deliver this notification on
-
exclusiveLock
- Specified by:
exclusiveLock
in interfaceUpdateGraph
- Returns:
- The exclusive
AwareFunctionalLock
to use with this update graph
-
clock
- Specified by:
clock
in interfaceUpdateGraph
- Returns:
- The
LogicalClock
to use with this update graph
-
parallelismFactor
public int parallelismFactor()Description copied from interface:UpdateGraph
Retrieve the number of independent update propagation tasks this UpdateGraph can process concurrently.For example, an implementation using a fixed-size thread pool of update task workers should return the size of the thread pool.
This is exposed in order to allow users to determine the ideal way to partition their queries for maximum parallelism without undue overhead.
- Specified by:
parallelismFactor
in interfaceUpdateGraph
- Returns:
- number of independent update propagation tasks this UpdateGraph can process concurrently
-
logDependencies
- Specified by:
logDependencies
in interfaceUpdateGraph
- Returns:
- A LogEntry that may be prefixed with UpdateGraph information
-
currentThreadProcessesUpdates
public boolean currentThreadProcessesUpdates()Description copied from interface:UpdateGraph
Test if the current thread is involved in processing updates for this UpdateGraph. If so, non-terminal user notifications on the current thread must not attempt to lock this UpdateGraph.- Specified by:
currentThreadProcessesUpdates
in interfaceUpdateGraph
- Returns:
- Whether the current thread is involved in processing updates for this UpdateGraph
-
serialTableOperationsSafe
public boolean serialTableOperationsSafe()Description copied from interface:UpdateGraph
Test if engine code executing on the current thread should assume safety for serial table operations. Operations annotated as concurrent are always safe.- Specified by:
serialTableOperationsSafe
in interfaceUpdateGraph
- Returns:
- Whether code on this thread should assume serial table operation safety
- See Also:
-
setSerialTableOperationsSafe
public boolean setSerialTableOperationsSafe(boolean newValue) Description copied from interface:UpdateGraph
User or engine code that makes its own determination about the safety of initiating serial table operations on the current thread may use this method to override default behavior. The previous value should be restored immediately after use, typically with the following pattern:boolean oldValue = assumeSerialTableOperations(true); try { // ... safe table operations here } finally { assumeSerialTableOperations(oldValue); }
- Specified by:
setSerialTableOperationsSafe
in interfaceUpdateGraph
- Parameters:
newValue
- the new value- Returns:
- the old value
- See Also:
-
addSource
Description copied from interface:UpdateSourceRegistrar
Add a source to this registrar.- Specified by:
addSource
in interfaceUpdateSourceRegistrar
- Parameters:
updateSource
- The table to add
-
removeSource
Description copied from interface:UpdateSourceRegistrar
Remove a source from this registrar.- Specified by:
removeSource
in interfaceUpdateSourceRegistrar
- Parameters:
updateSource
- The table to remove
-
supportsRefreshing
public boolean supportsRefreshing()- Specified by:
supportsRefreshing
in interfaceUpdateGraph
- Returns:
- Whether this UpdateGraph has a mechanism that supports refreshing
-
requestRefresh
public void requestRefresh()Description copied from interface:UpdateGraph
Request that this UpdateGraph process any pending updates as soon as practicable. Updates "hurried" in this way are otherwise processed as normal.- Specified by:
requestRefresh
in interfaceUpdateGraph
- Specified by:
requestRefresh
in interfaceUpdateSourceRegistrar
-
stop
public void stop()Description copied from interface:UpdateGraph
Attempt to stop this update graph, and cease processing further notifications.- Specified by:
stop
in interfaceUpdateGraph
-