Interface Synchronizer

  • All Known Implementing Classes:
    FlashbackSynchronizer

    public interface Synchronizer
    Synchronizes changes in an external data source with a PGX graph.
    • Method Detail

      • fetch

        void fetch()
            throws java.sql.SQLException
        Fetches the changes from the external data source. You can call this multiple times to accumulate deltas. The deltas reset once you call apply().
        Throws:
        java.sql.SQLException
      • apply

        PgxGraph apply()
        Applies the changes to the underlying PGX graph. Require fetch() to be called first.
        Returns:
        the new snapshot of the graph with the fetched changes applied.
      • getGraphDelta

        GraphDelta getGraphDelta()
        Get the description of the delta between current snapshot and the fetched changes. Can be used to make a decision for when to apply the delta.
        Returns:
        the description of the delta.
      • sync

        default PgxGraph sync()
                       throws java.sql.SQLException
        Synchronize changes from the external data source. By default, this calls fetch() followed by apply()
        Returns:
        the new snapshot of the graph with the fetched changes applied.
        Throws:
        java.sql.SQLException