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
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddNotification(@NotNull NotificationQueue.Notification notification) Add a notification for this NotificationQueue to deliver (by invoking its run() method).voidaddNotifications(@NotNull Collection<? extends NotificationQueue.Notification> notifications) Enqueue a collection of notifications to be flushed.voidAdd a source to this registrar.clock()booleanTest if the current thread is involved in processing updates for this UpdateGraph.getName()booleanmaybeAddNotification(@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.intRetrieve the number of independent update propagation tasks this UpdateGraph can process concurrently.voidremoveSource(@NotNull Runnable updateSource) Remove a source from this registrar.voidRequest that this UpdateGraph process any pending updates as soon as practicable.booleansatisfied(long step) Is this ancestor satisfied? Note that this method must be safe to call on any thread.booleanTest if engine code executing on the current thread should assume safety for serial table operations.booleansetSerialTableOperationsSafe(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.voidstop()Attempt to stop this update graph, and cease processing further notifications.booleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.deephaven.engine.updategraph.NotificationQueue.Dependency
getUpdateGraphMethods inherited from interface io.deephaven.engine.updategraph.UpdateGraph
allowSerialTableOperations, allowSerialTableOperations, cast, checkInitiateSerialTableOperation, requestSignal, runWhenIdleMethods inherited from interface io.deephaven.engine.updategraph.UpdateSourceRegistrar
removeSources
-
Field Details
-
INSTANCE
-
-
Method Details
-
append
- Specified by:
appendin interfaceLogOutputAppendable
-
satisfied
public boolean satisfied(long step) Description copied from interface:NotificationQueue.DependencyIs this ancestor satisfied? Note that this method must be safe to call on any thread.- Specified by:
satisfiedin 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:
getUpdateGraphin interfaceNotificationQueue.Dependency- Returns:
- the update graph that this dependency is a part of
-
getName
- Specified by:
getNamein interfaceUpdateGraph- Returns:
- The name of this UpdateGraph
-
addNotification
Description copied from interface:NotificationQueueAdd 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:
addNotificationin interfaceNotificationQueue- Parameters:
notification- The notification to add
-
addNotifications
public void addNotifications(@NotNull @NotNull Collection<? extends NotificationQueue.Notification> notifications) Description copied from interface:NotificationQueueEnqueue a collection of notifications to be flushed.- Specified by:
addNotificationsin interfaceNotificationQueue- Parameters:
notifications- The notification to enqueue- See Also:
-
maybeAddNotification
public boolean maybeAddNotification(@NotNull @NotNull NotificationQueue.Notification notification, long deliveryStep) Description copied from interface:NotificationQueueAdd 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:
maybeAddNotificationin interfaceNotificationQueue- Parameters:
notification- The notification to adddeliveryStep- The step to deliver this notification on
-
exclusiveLock
- Specified by:
exclusiveLockin interfaceUpdateGraph- Returns:
- The exclusive
AwareFunctionalLockto use with this update graph
-
clock
- Specified by:
clockin interfaceUpdateGraph- Returns:
- The
LogicalClockto use with this update graph
-
parallelismFactor
public int parallelismFactor()Description copied from interface:UpdateGraphRetrieve 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:
parallelismFactorin interfaceUpdateGraph- Returns:
- number of independent update propagation tasks this UpdateGraph can process concurrently
-
logDependencies
- Specified by:
logDependenciesin interfaceUpdateGraph- Returns:
- A LogEntry that may be prefixed with UpdateGraph information
-
currentThreadProcessesUpdates
public boolean currentThreadProcessesUpdates()Description copied from interface:UpdateGraphTest 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:
currentThreadProcessesUpdatesin interfaceUpdateGraph- Returns:
- Whether the current thread is involved in processing updates for this UpdateGraph
-
serialTableOperationsSafe
public boolean serialTableOperationsSafe()Description copied from interface:UpdateGraphTest if engine code executing on the current thread should assume safety for serial table operations. Operations annotated as concurrent are always safe.- Specified by:
serialTableOperationsSafein 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:UpdateGraphUser 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:
setSerialTableOperationsSafein interfaceUpdateGraph- Parameters:
newValue- the new value- Returns:
- the old value
- See Also:
-
addSource
Description copied from interface:UpdateSourceRegistrarAdd a source to this registrar.- Specified by:
addSourcein interfaceUpdateSourceRegistrar- Parameters:
updateSource- The table to add
-
removeSource
Description copied from interface:UpdateSourceRegistrarRemove a source from this registrar.- Specified by:
removeSourcein interfaceUpdateSourceRegistrar- Parameters:
updateSource- The table to remove
-
supportsRefreshing
public boolean supportsRefreshing()- Specified by:
supportsRefreshingin interfaceUpdateGraph- Returns:
- Whether this UpdateGraph has a mechanism that supports refreshing
-
requestRefresh
public void requestRefresh()Description copied from interface:UpdateGraphRequest that this UpdateGraph process any pending updates as soon as practicable. Updates "hurried" in this way are otherwise processed as normal.- Specified by:
requestRefreshin interfaceUpdateGraph- Specified by:
requestRefreshin interfaceUpdateSourceRegistrar
-
stop
public void stop()Description copied from interface:UpdateGraphAttempt to stop this update graph, and cease processing further notifications.- Specified by:
stopin interfaceUpdateGraph
-