Interface NotificationQueue

All Known Subinterfaces:
UpdateGraph
All Known Implementing Classes:
BaseUpdateGraph, EventDrivenUpdateGraph, PeriodicUpdateGraph, PoisonedUpdateGraph

public interface NotificationQueue
Interface for notification of update graph node changes.
  • Method Details

    • addNotification

      void addNotification(@NotNull @NotNull NotificationQueue.Notification notification)
      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.
      Parameters:
      notification - The notification to add
    • addNotifications

      void addNotifications(@NotNull @NotNull Collection<? extends NotificationQueue.Notification> notifications)
      Enqueue a collection of notifications to be flushed.
      Parameters:
      notifications - The notification to enqueue
      See Also:
    • maybeAddNotification

      boolean maybeAddNotification(@NotNull @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. This is only supported for non-terminal notifications.
      Parameters:
      notification - The notification to add
      deliveryStep - The step to deliver this notification on