public static interface ReplicationConnection.Builder
ReplicationConnection| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEFAULT_DROP_SLOT_ON_CLOSE |
static boolean |
DEFAULT_EXPORT_SNAPSHOT |
static String |
DEFAULT_PUBLICATION_NAME |
static String |
DEFAULT_SLOT_NAME
Default replication settings
|
| Modifier and Type | Method and Description |
|---|---|
ReplicationConnection |
build()
Creates a new
ReplicationConnection instance |
ReplicationConnection.Builder |
doSnapshot(boolean doSnapshot)
Whether or not the snapshot is executed
|
ReplicationConnection.Builder |
dropSlotOnClose(boolean dropSlotOnClose)
Whether or not to drop the replication slot once the replication connection closes
|
ReplicationConnection.Builder |
exportSnapshotOnCreate(boolean exportSnapshot)
Whether or not to export the snapshot when creating the slot
|
ReplicationConnection.Builder |
statusUpdateInterval(Duration statusUpdateInterval)
The number of milli-seconds the replication connection should periodically send updates to the server.
|
ReplicationConnection.Builder |
streamParams(String streamParams)
Optional parameters to pass to the logical decoder when the stream starts.
|
ReplicationConnection.Builder |
withPlugin(PostgresConnectorConfig.LogicalDecoder plugin)
Sets the instance for the PG logical decoding plugin
|
ReplicationConnection.Builder |
withPublication(String publicationName)
Sets the publication name for the PG logical publication
|
ReplicationConnection.Builder |
withPublicationAutocreateMode(PostgresConnectorConfig.AutoCreateMode publicationAutocreateMode)
Sets the publication autocreate mode for the PG logical publication
|
ReplicationConnection.Builder |
withSchema(PostgresSchema schema)
Sets the schema instance
|
ReplicationConnection.Builder |
withSlot(String slotName)
Sets the name for the PG logical replication slot
|
ReplicationConnection.Builder |
withTableFilter(RelationalTableFilters tableFilter)
Sets the publication tables to watch for the PG logical publication
|
ReplicationConnection.Builder |
withTruncateHandlingMode(PostgresConnectorConfig.TruncateHandlingMode truncateHandlingMode)
Sets the instance for the Truncate handling mode
|
ReplicationConnection.Builder |
withTypeRegistry(TypeRegistry typeRegistry) |
static final String DEFAULT_SLOT_NAME
static final String DEFAULT_PUBLICATION_NAME
static final boolean DEFAULT_DROP_SLOT_ON_CLOSE
static final boolean DEFAULT_EXPORT_SNAPSHOT
ReplicationConnection.Builder withSlot(String slotName)
slotName - the name of the slot, may not be null.DEFAULT_SLOT_NAMEReplicationConnection.Builder withPublication(String publicationName)
publicationName - the name of the publication, may not be null.DEFAULT_PUBLICATION_NAMEReplicationConnection.Builder withTableFilter(RelationalTableFilters tableFilter)
tableFilter - the configured table filters#config.getTableFilters()ReplicationConnection.Builder withPublicationAutocreateMode(PostgresConnectorConfig.AutoCreateMode publicationAutocreateMode)
publicationAutocreateMode - the name of the publication, may not be null.#PostgresConnectorConfig.PublicationAutocreateMode.ALL_TABLESReplicationConnection.Builder withPlugin(PostgresConnectorConfig.LogicalDecoder plugin)
pluginName - the name of the slot, may not be null.#PROTOBUF_PLUGIN_NAMEReplicationConnection.Builder withTruncateHandlingMode(PostgresConnectorConfig.TruncateHandlingMode truncateHandlingMode)
truncateHandlingMode - Truncate handling mode, may not be null.PostgresConnectorConfig.TruncateHandlingModeReplicationConnection.Builder dropSlotOnClose(boolean dropSlotOnClose)
dropSlotOnClose - true if the slot should be dropped once the connection is closed, false otherwiseDEFAULT_DROP_SLOT_ON_CLOSEReplicationConnection.Builder statusUpdateInterval(Duration statusUpdateInterval)
statusUpdateInterval - a duration; null or non-positive value causes Postgres' default to be appliedReplicationConnection.Builder withTypeRegistry(TypeRegistry typeRegistry)
ReplicationConnection.Builder withSchema(PostgresSchema schema)
schema - the schema, must not be nullReplicationConnection.Builder streamParams(String streamParams)
streamParams - String of key and value pairs declared with "=". Pairs are separated by ";".
Example: "add-tables=public.table,public.table2;include-lsn=true"#STREAM_PARAMSReplicationConnection.Builder exportSnapshotOnCreate(boolean exportSnapshot)
exportSnapshot - true if a snapshot should be exported, false if otherwiseDEFAULT_EXPORT_SNAPSHOTReplicationConnection.Builder doSnapshot(boolean doSnapshot)
doSnapshot - true if a snapshot is going to be executed, false if otherwiseReplicationConnection build()
ReplicationConnection instanceCopyright © 2021 JBoss by Red Hat. All rights reserved.