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 Classes Modifier and Type Interface Description static interface
NotificationQueue.Dependency
static interface
NotificationQueue.IndexUpdateNotification
static interface
NotificationQueue.Notification
A notification that may be enqueued. -
Method Summary
Modifier and Type Method Description void
addNotification(NotificationQueue.Notification notification)
Add a notification for this NotificationQueue to deliver (by invoking its run() method).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
-
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
-