Package com.illumon.iris.db.v2
Interface Listener
- All Superinterfaces:
ListenerBase
,LivenessManager
,LivenessNode
,LivenessReferent
- All Known Implementing Classes:
BaseTable.ListenerImpl
,DynamicTableToAdoConverter
,InstrumentedListener
,InstrumentedListenerAdapter
,SwapListener
,TableLogger
Listener for table changes.
-
Method Summary
Modifier and TypeMethodDescriptiongetNotification
(Index added, Index removed, Index modified) Creates a notification for the table changes.void
Process notification of table changes.void
setInitialImage
(Index initialImage) Sets the index for the initial data.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:
added
- rows addedremoved
- rows removedmodified
- rows modified
-
getNotification
NotificationQueue.IndexUpdateNotification getNotification(Index added, Index removed, Index modified) Creates a notification for the table changes.- Parameters:
added
- rows addedremoved
- rows removedmodified
- rows modified- Returns:
- table change notification
-
setInitialImage
Sets the index for the initial data.- Parameters:
initialImage
- initial image
-