Package com.illumon.iris.db.tables.live
Interface NotificationQueue
- All Known Implementing Classes:
LiveTableMonitor
public interface NotificationQueue
Interface for notification of table changes.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
static interface
static interface
A notification that may be enqueued. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addNotification
(NotificationQueue.Notification notification) Add a notification for this NotificationQueue to deliver (by invoking its run() method).default void
addNotifications
(Collection<? extends NotificationQueue.Notification> notifications) boolean
maybeAddNotification
(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.
-
Method Details
-
addNotification
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
default void addNotifications(@NotNull Collection<? extends NotificationQueue.Notification> notifications) -
maybeAddNotification
boolean maybeAddNotification(@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 adddeliveryStep
- The step to deliver this notification on
-