Package oracle.pgx.api
Interface Synchronizer
-
- All Known Implementing Classes:
FlashbackSynchronizer
public interface Synchronizer
Synchronizes changes in an external data source with a PGX graph.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Synchronizer.Builder<T extends Synchronizer>
Builder class forSynchronizer
objects.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description PgxGraph
apply()
Applies the changes to the underlying PGX graph.void
fetch()
Fetches the changes from the external data source.GraphDelta
getGraphDelta()
Get the description of the delta between current snapshot and the fetched changes.default PgxGraph
sync()
Synchronize changes from the external data source.
-
-
-
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 callapply()
.- Throws:
java.sql.SQLException
-
apply
PgxGraph apply()
Applies the changes to the underlying PGX graph. Requirefetch()
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.
-
-