Interface MasterTableListener


  • interface MasterTableListener
    An interface that is notified of add/remove events on a MasterTableDataSource. The purpose of this interface is so that a high level function can listen for changes to the underlying table and cache high level representations of the rows as appropriate.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void rowAdded​(int row_number, RowData row_data)
      Notifies of a new row addition to the underlying representation.
      void rowRemoved​(int row_number)
      Notifies that a row has been permanently removed from the underlying representation.
    • Method Detail

      • rowAdded

        void rowAdded​(int row_number,
                      RowData row_data)
        Notifies of a new row addition to the underlying representation. Note that this addition doesn't necessarily mean that the change is a committed change. There is no way to tell if a change is committed or not.

        SYNCHRONIZATION ISSUE: Note that extreme care should be taken with deadlock issues with this method. This is a call-back from MasterTableDataSource when its monikor is in a synchronized state. This means there is potential for deadlock if care is not taken. Listeners of this should event should not try and inspect the state of the database.

      • rowRemoved

        void rowRemoved​(int row_number)
        Notifies that a row has been permanently removed from the underlying representation. This means the row has been committed removed and the table row garbage collector has decided it is eligible to be recycled.

        Normally the garbage collector thread will notify of this event.

        SYNCHRONIZATION ISSUE: Note that extreme care should be taken with deadlock issues with this method. This is a call-back from MasterTableDataSource when its monikor is in a synchronized state. This means there is potential for deadlock if care is not taken. Listeners of this should event should not try and inspect the state of the database.