@Incubating public interface Snapshotter
shouldSnapshot() or shouldStream()
or true for both.| Modifier and Type | Method and Description |
|---|---|
Optional<String> |
buildSnapshotQuery(TableId tableId)
Generate a valid postgres query string for the specified table, or an empty
Optional
to skip snapshotting this table (but that table will still be streamed from) |
default boolean |
exportSnapshot() |
void |
init(PostgresConnectorConfig config,
OffsetState sourceInfo,
SlotState slotState) |
boolean |
shouldSnapshot() |
boolean |
shouldStream() |
default Optional<String> |
snapshotTableLockingStatement(Duration lockTimeout,
Set<TableId> tableIds)
Returns a SQL statement for locking the given tables during snapshotting, if required by the specific snapshotter
implementation.
|
default String |
snapshotTransactionIsolationLevelStatement(SlotCreationResult newSlotInfo)
Return a new string that set up the transaction for snapshotting
|
void init(PostgresConnectorConfig config, OffsetState sourceInfo, SlotState slotState)
boolean shouldSnapshot()
boolean shouldStream()
default boolean exportSnapshot()
Optional<String> buildSnapshotQuery(TableId tableId)
Optional
to skip snapshotting this table (but that table will still be streamed from)tableId - the table to generate a query fordefault String snapshotTransactionIsolationLevelStatement(SlotCreationResult newSlotInfo)
newSlotInfo - if a new slow was created for snapshotting, this contains information from
the `create_replication_slot` commandCopyright © 2019 JBoss by Red Hat. All rights reserved.