public class ExportedSnapshotter extends Object implements Snapshotter
| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
LOGGER |
private OffsetState |
sourceInfo |
| Constructor and Description |
|---|
ExportedSnapshotter() |
| 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) |
boolean |
exportSnapshot() |
void |
init(PostgresConnectorConfig config,
OffsetState sourceInfo,
SlotState slotState) |
boolean |
shouldSnapshot() |
boolean |
shouldStream() |
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.
|
String |
snapshotTransactionIsolationLevelStatement(SlotCreationResult newSlotInfo)
Return a new string that set up the transaction for snapshotting
|
private static final org.slf4j.Logger LOGGER
private OffsetState sourceInfo
public void init(PostgresConnectorConfig config, OffsetState sourceInfo, SlotState slotState)
init in interface Snapshotterpublic boolean shouldSnapshot()
shouldSnapshot in interface Snapshotterpublic boolean shouldStream()
shouldStream in interface Snapshotterpublic boolean exportSnapshot()
exportSnapshot in interface Snapshotterpublic Optional<String> buildSnapshotQuery(TableId tableId)
SnapshotterOptional
to skip snapshotting this table (but that table will still be streamed from)buildSnapshotQuery in interface SnapshottertableId - the table to generate a query forpublic Optional<String> snapshotTableLockingStatement(Duration lockTimeout, Set<TableId> tableIds)
SnapshottersnapshotTableLockingStatement in interface Snapshotterpublic String snapshotTransactionIsolationLevelStatement(SlotCreationResult newSlotInfo)
SnapshottersnapshotTransactionIsolationLevelStatement in interface SnapshotternewSlotInfo - 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.