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 |
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 |
withSchema(PostgresSchema schema)
Sets the schema instance
|
ReplicationConnection.Builder |
withSlot(String slotName)
Sets the name for the PG logical replication slot
|
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 withPlugin(PostgresConnectorConfig.LogicalDecoder plugin)
pluginName - the name of the slot, may not be null.#PROTOBUF_PLUGIN_NAMEReplicationConnection.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 build()
ReplicationConnection instanceCopyright © 2019 JBoss by Red Hat. All rights reserved.