Class 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 Details

    • UpdateSourceCombiner

      public UpdateSourceCombiner(UpdateGraph updateGraph)
  • Method Details

    • install

      public void install()
      Add this UpdateSourceCombiner to the update graph passed at construction. This should only be done once.
    • run

      public void run()
      Specified by:
      run in interface Runnable
    • addSource

      public void addSource(@NotNull @NotNull Runnable updateSource)
      Description copied from interface: UpdateSourceRegistrar
      Add a source to this registrar.
      Specified by:
      addSource in interface UpdateSourceRegistrar
      Parameters:
      updateSource - The table to add
    • removeSource

      public void removeSource(@NotNull @NotNull Runnable updateSource)
      Description copied from interface: UpdateSourceRegistrar
      Remove a source from this registrar.
      Specified by:
      removeSource in interface UpdateSourceRegistrar
      Parameters:
      updateSource - The table to remove
    • requestRefresh

      public void requestRefresh()
      Passes through to the update graph passed at construction.
      Specified by:
      requestRefresh in interface UpdateSourceRegistrar
    • destroy

      public void destroy()
      Description copied from class: ReferenceCountedLivenessReferent
      Attempt 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:
      destroy in class ReferenceCountedLivenessReferent
    • 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 interface NotificationQueue.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

      public UpdateGraph getUpdateGraph()
      Specified by:
      getUpdateGraph in interface NotificationQueue.Dependency
      Returns:
      the update graph that this dependency is a part of