Package io.deephaven.engine.updategraph
Class UpdateSourceCombiner
java.lang.Object
io.deephaven.util.referencecounting.ReferenceCounted
io.deephaven.engine.liveness.ReferenceCountedLivenessReferent
io.deephaven.engine.liveness.ReferenceCountedLivenessNode
io.deephaven.engine.liveness.LivenessArtifact
io.deephaven.engine.updategraph.UpdateSourceCombiner
- All Implemented Interfaces:
LogOutputAppendable,LivenessManager,LivenessNode,LivenessReferent,NotificationQueue.Dependency,UpdateSourceRegistrar,Serializable,Runnable
public class UpdateSourceCombiner
extends LivenessArtifact
implements Runnable, UpdateSourceRegistrar
Update source that combines multiple sources in order to force them to be refreshed as a unit within the
update graph provided at construction.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionUpdateSourceCombiner(@NotNull UpdateGraph updateGraph) Construct an UpdateSourceCombiner with default parameters.UpdateSourceCombiner(@NotNull UpdateGraph updateGraph, boolean parallel, @NotNull Supplier<WeakReferenceManager<Runnable>> weakReferenceManagerFactory) Construct an UpdateSourceCombiner. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a source to this registrar.voiddestroy()Attempt to release (destructively when necessary) resources held by this object.voidinstall()Add this UpdateSourceCombiner to theupdate graphpassed at construction.voidremoveSource(@NotNull Runnable updateSource) Remove a source from this registrar.voidPasses through to theupdate graphpassed at construction.voidrun()booleansatisfied(long step) Is this ancestor satisfied? Note that this method must be safe to call on any thread.Methods 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
append, 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.base.log.LogOutputAppendable
appendMethods inherited from interface io.deephaven.engine.updategraph.NotificationQueue.Dependency
getUpdateGraphMethods inherited from interface io.deephaven.engine.updategraph.UpdateSourceRegistrar
removeSources
-
Constructor Details
-
UpdateSourceCombiner
Construct an UpdateSourceCombiner with default parameters. The result will process updates serially, and will use a concurrentArrayWeakReferenceManager.- Parameters:
updateGraph- TheUpdateGraphto register with
-
UpdateSourceCombiner
public UpdateSourceCombiner(@NotNull @NotNull UpdateGraph updateGraph, boolean parallel, @NotNull @NotNull Supplier<WeakReferenceManager<Runnable>> weakReferenceManagerFactory) Construct an UpdateSourceCombiner.- Parameters:
updateGraph- TheUpdateGraphto register withparallel- Whether to process updates in parallelweakReferenceManagerFactory- Factory for theWeakReferenceManagerto use when holding sources
-
-
Method Details
-
install
public void install()Add this UpdateSourceCombiner to theupdate graphpassed at construction. This should only be done once. -
run
public void run() -
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
-
requestRefresh
public void requestRefresh()Passes through to theupdate graphpassed at construction.- Specified by:
requestRefreshin interfaceUpdateSourceRegistrar
-
destroy
@OverridingMethodsMustInvokeSuper public 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
-
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
-