Package io.deephaven.engine.table.impl
Class MergedListener
- All Implemented Interfaces:
LogOutputAppendable,LivenessManager,LivenessNode,LivenessReferent,NotificationQueue.Dependency,Serializable
- Direct Known Subclasses:
BucketedChunkedAjMergedListener,PythonMergedListenerAdapter,SnapshotIncrementalListener,ZeroKeyChunkedAjMergedListener
public abstract class MergedListener
extends LivenessArtifact
implements NotificationQueue.Dependency
A merged listener has a collection of
ListenerRecorders. Each one must complete before the merged listener
fires its sole notification for the cycle.
You must use a MergedListener if your result table has multiple sources, otherwise it is possible for a table to produce notifications more than once in a cycle; which is an error.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final @Nullable PerformanceEntryprotected final QueryTable -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMergedListener(Iterable<? extends ListenerRecorder> recorders, Iterable<NotificationQueue.Dependency> dependencies, String listenerDescription, @Nullable QueryTable result) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected booleancanExecute(long step) protected voiddestroy()Attempt to release (destructively when necessary) resources held by this object.@Nullable PerformanceEntrygetEntry()protected Iterable<? extends ListenerRecorder> protected voidhandleUncaughtException(Exception updateException) booleanisFailed()protected voidlogNewAncestors(Iterable<? extends ListenerRecorder> recorders) voidfinal voidnotifyOnUpstreamError(@NotNull Throwable upstreamError, TableListener.Entry errorSourceEntry) protected abstract voidprocess()protected voidpropagateError(boolean uncaughtExceptionFromProcess, @NotNull Throwable error, TableListener.Entry entry) Propagate an error to downstream listeners.protected voidpropagateErrorDownstream(boolean fromProcess, @NotNull Throwable error, TableListener.Entry entry) booleansatisfied(long step) Is this ancestor satisfied? Note that this method must be safe to call on any thread.protected final voidscheduleDelayedErrorNotifier(@NotNull Throwable error, TableListener.Entry entry, @NotNull Collection<BaseTable> results) protected booleanMethods inherited from class io.deephaven.engine.liveness.LivenessArtifact
manageWithCurrentScopeMethods inherited from class io.deephaven.engine.liveness.ReferenceCountedLivenessNode
getWeakReference, initializeTransientFieldsForLiveness, onReferenceCountAtZero, tryManage, tryUnmanage, tryUnmanageMethods inherited from class io.deephaven.engine.liveness.ReferenceCountedLivenessReferent
dropReference, tryRetainReferenceMethods inherited from class io.deephaven.util.referencecounting.ReferenceCounted
decrementReferenceCount, forceReferenceCountToZero, getReferenceCountDebug, incrementReferenceCount, resetReferenceCount, toString, tryDecrementReferenceCount, tryIncrementReferenceCountMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.deephaven.engine.liveness.LivenessManager
manage, unmanage, unmanageMethods inherited from interface io.deephaven.engine.liveness.LivenessReferent
dropReference, getReferentDescription, retainReference, tryRetainReferenceMethods inherited from interface io.deephaven.engine.updategraph.NotificationQueue.Dependency
getUpdateGraph
-
Field Details
-
result
-
entry
-
-
Constructor Details
-
MergedListener
protected MergedListener(Iterable<? extends ListenerRecorder> recorders, Iterable<NotificationQueue.Dependency> dependencies, String listenerDescription, @Nullable @Nullable QueryTable result)
-
-
Method Details
-
logNewAncestors
-
getUpdateGraph
- Specified by:
getUpdateGraphin interfaceNotificationQueue.Dependency- Returns:
- the update graph that this dependency is a part of
-
getEntry
-
getRecorders
-
isFailed
public boolean isFailed() -
notifyOnUpstreamError
public final void notifyOnUpstreamError(@NotNull @NotNull Throwable upstreamError, @Nullable TableListener.Entry errorSourceEntry) -
notifyChanges
public void notifyChanges() -
propagateError
protected void propagateError(boolean uncaughtExceptionFromProcess, @NotNull @NotNull Throwable error, @Nullable TableListener.Entry entry) Propagate an error to downstream listeners.- Parameters:
uncaughtExceptionFromProcess- true if the exception was thrown fromprocess(), false otherwiseerror- the error to propagateentry- theTableListener.Entrythat threw the error.
-
systemicResult
protected boolean systemicResult() -
destroy
@OverridingMethodsMustInvokeSuper protected void destroy()Description copied from class:ReferenceCountedLivenessReferentAttempt to release (destructively when necessary) resources held by this object. This may render the object unusable for subsequent operations. Implementations should be sure to call super.destroy().This is intended to only ever be used as a side effect of decreasing the reference count to 0.
- Overrides:
destroyin classReferenceCountedLivenessReferent
-
propagateErrorDownstream
protected void propagateErrorDownstream(boolean fromProcess, @NotNull @NotNull Throwable error, @Nullable TableListener.Entry entry) -
scheduleDelayedErrorNotifier
protected final void scheduleDelayedErrorNotifier(@NotNull @NotNull Throwable error, @Nullable TableListener.Entry entry, @NotNull @NotNull Collection<BaseTable> results) -
process
protected abstract void process() -
append
- Specified by:
appendin interfaceLogOutputAppendable- Overrides:
appendin classReferenceCounted
-
canExecute
protected boolean canExecute(long step) -
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)
-
handleUncaughtException
-
accumulatePeformanceEntry
-