Package com.illumon.iris.db.v2
Interface ShiftAwareListener
- All Superinterfaces:
ListenerBase
,LivenessManager
,LivenessNode
,LivenessReferent
- All Known Implementing Classes:
AddedTableLoggingListener
,AppendOnlyAssertionInstrumentedListenerAdapter
,BaseTable.ShiftAwareListenerImpl
,FullTableLoggingListener
,InstrumentedShiftAwareListener
,InstrumentedShiftAwareListenerAdapter
,JoinListenerRecorder
,ListenerRecorder
,PrintListener
,ShiftAwareSwapListener
,SnapshotInternalListener
,SortedAssertionInstrumentedListenerAdapter
,SortListener
,ToMapListener
Shift-aware listener for table changes.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
A shift aware update structure, containing the rows and columns that were added, modified, removed, and shifted on a given cycle. -
Method Summary
Modifier and TypeMethodDescriptiongetNotification
(ShiftAwareListener.Update upstream) Creates a notification for the table changes.void
onUpdate
(ShiftAwareListener.Update upstream) Process notification of table changes.Methods inherited from interface com.illumon.iris.db.v2.ListenerBase
getErrorNotification, onFailure
Methods inherited from interface com.illumon.iris.db.util.liveness.LivenessManager
manage, tryManage
Methods inherited from interface com.illumon.iris.db.util.liveness.LivenessReferent
dropReference, getReferentDescription, getWeakReference, retainReference, tryRetainReference
-
Method Details
-
onUpdate
Process notification of table changes.The Listener onUpdate call executes within the
LiveTableMonitor
refresh loop. Any tables used within the listener's onUpdate call must have already been refreshed. Using the typical pattern of a Listener that is listening to a single table, withDynamicTable.listenForUpdates(Listener)
, this is trivially true.When the listener must reference more than just one parent, the tables (or other objects) it references, must be made a
NotificationQueue.Dependency
of the listener. For listeners that reference multiple ticking tables, a common pattern is to use aMergedListener
and collection ofListenerRecorder
s.- Parameters:
upstream
- The set of upstream table updates.
-
getNotification
Creates a notification for the table changes.- Parameters:
upstream
- The set of upstream table updates.- Returns:
- table change notification
-