Interface TableObserver


  • public interface TableObserver
    Observer over a table to monitor changes.

    The table observer is a mechanism used to monitor periodically changes made to the table. This scenario is common in multi-threaded application where a thread is modifying the table and one or multiple threads need to take action when updates are made.

    Table observer users should periodically call the hasTableChanged() method to check the status. Each call resets the observer so if the method returns true and the table doesn't change after that it will return false next time.

    Observers should be destroyed when not needed anymore. A new observer can be obtained from the Table instance.

    See Also:
    Table
    • Method Detail

      • hasTableChanged

        boolean hasTableChanged()
        Returns true if the table has changed.
        Returns:
        true if changed, false otherwise
      • getTable

        Table getTable()
        Gets the table this observer belongs to.
        Returns:
        the table
      • getDiff

        TableDiff getDiff()
        Gets the table difference.
        Returns:
        the table diff
      • destroy

        void destroy()
        Destroys this observer.
      • isDestroyed

        boolean isDestroyed()
        Returns true if this observer has been destroyed.
        Returns:
        true if destroyed, false otherwise