Class PostgresReplicationConnection.ReplicationConnectionBuilder
java.lang.Object
io.debezium.connector.postgresql.connection.PostgresReplicationConnection.ReplicationConnectionBuilder
- All Implemented Interfaces:
ReplicationConnection.Builder
- Enclosing class:
- PostgresReplicationConnection
protected static class PostgresReplicationConnection.ReplicationConnectionBuilder
extends Object
implements ReplicationConnection.Builder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final PostgresConnectorConfigprivate booleanprivate PostgresConnectionprivate Stringprivate PostgresSchemaprivate Stringprivate Propertiesprivate Durationprivate RelationalTableFiltersprivate TypeRegistryFields inherited from interface io.debezium.connector.postgresql.connection.ReplicationConnection.Builder
DEFAULT_DROP_SLOT_ON_CLOSE, DEFAULT_PUBLICATION_NAME, DEFAULT_SLOT_NAME -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected -
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates a newReplicationConnectioninstancedropSlotOnClose(boolean dropSlotOnClose) Whether or not to drop the replication slot once the replication connection closesjdbcMetadataConnection(PostgresConnection jdbcConnection) Provides a JDBC connection used to query metadata, database information, ...statusUpdateInterval(Duration statusUpdateInterval) The number of milli-seconds the replication connection should periodically send updates to the server.streamParams(String slotStreamParams) Optional parameters to pass to the logical decoder when the stream starts.Sets the instance for the PG logical decoding pluginwithPublication(String publicationName) Sets the publication name for the PG logical publicationwithPublicationAutocreateMode(PostgresConnectorConfig.AutoCreateMode publicationAutocreateMode) Sets the publication autocreate mode for the PG logical publicationwithSchema(PostgresSchema schema) Sets the schema instanceSets the name for the PG logical replication slotwithTableFilter(RelationalTableFilters tableFilter) Sets the publication tables to watch for the PG logical publicationwithTypeRegistry(TypeRegistry typeRegistry)
-
Field Details
-
config
-
slotName
-
publicationName
-
tableFilter
-
publicationAutocreateMode
-
plugin
-
dropSlotOnClose
private boolean dropSlotOnClose -
statusUpdateIntervalVal
-
typeRegistry
-
schema
-
slotStreamParams
-
jdbcConnection
-
-
Constructor Details
-
ReplicationConnectionBuilder
-
-
Method Details
-
withSlot
Description copied from interface:ReplicationConnection.BuilderSets the name for the PG logical replication slot- Specified by:
withSlotin interfaceReplicationConnection.Builder- Parameters:
slotName- the name of the slot, may not be null.- Returns:
- this instance
- See Also:
-
withPublication
Description copied from interface:ReplicationConnection.BuilderSets the publication name for the PG logical publication- Specified by:
withPublicationin interfaceReplicationConnection.Builder- Parameters:
publicationName- the name of the publication, may not be null.- Returns:
- this instance
- See Also:
-
withTableFilter
Description copied from interface:ReplicationConnection.BuilderSets the publication tables to watch for the PG logical publication- Specified by:
withTableFilterin interfaceReplicationConnection.Builder- Parameters:
tableFilter- the configured table filters- Returns:
- this instance
-
withPublicationAutocreateMode
public ReplicationConnection.Builder withPublicationAutocreateMode(PostgresConnectorConfig.AutoCreateMode publicationAutocreateMode) Description copied from interface:ReplicationConnection.BuilderSets the publication autocreate mode for the PG logical publication- Specified by:
withPublicationAutocreateModein interfaceReplicationConnection.Builder- Parameters:
publicationAutocreateMode- the name of the publication, may not be null.- Returns:
- this instance
-
withPlugin
public PostgresReplicationConnection.ReplicationConnectionBuilder withPlugin(PostgresConnectorConfig.LogicalDecoder plugin) Description copied from interface:ReplicationConnection.BuilderSets the instance for the PG logical decoding plugin- Specified by:
withPluginin interfaceReplicationConnection.Builder- Returns:
- this instance
- See Also:
-
#PROTOBUF_PLUGIN_NAME
-
dropSlotOnClose
public PostgresReplicationConnection.ReplicationConnectionBuilder dropSlotOnClose(boolean dropSlotOnClose) Description copied from interface:ReplicationConnection.BuilderWhether or not to drop the replication slot once the replication connection closes- Specified by:
dropSlotOnClosein interfaceReplicationConnection.Builder- Parameters:
dropSlotOnClose- true if the slot should be dropped once the connection is closed, false otherwise- Returns:
- this instance
- See Also:
-
streamParams
public PostgresReplicationConnection.ReplicationConnectionBuilder streamParams(String slotStreamParams) Description copied from interface:ReplicationConnection.BuilderOptional parameters to pass to the logical decoder when the stream starts.- Specified by:
streamParamsin interfaceReplicationConnection.Builder- Parameters:
slotStreamParams- String of key and value pairs declared with "=". Pairs are separated by ";". Example: "add-tables=public.table,public.table2;include-lsn=true"- Returns:
- this instance
- See Also:
-
#STREAM_PARAMS
-
statusUpdateInterval
public PostgresReplicationConnection.ReplicationConnectionBuilder statusUpdateInterval(Duration statusUpdateInterval) Description copied from interface:ReplicationConnection.BuilderThe number of milli-seconds the replication connection should periodically send updates to the server.- Specified by:
statusUpdateIntervalin interfaceReplicationConnection.Builder- Parameters:
statusUpdateInterval- a duration; null or non-positive value causes Postgres' default to be applied- Returns:
- this instance
-
jdbcMetadataConnection
Description copied from interface:ReplicationConnection.BuilderProvides a JDBC connection used to query metadata, database information, ...- Specified by:
jdbcMetadataConnectionin interfaceReplicationConnection.Builder- Returns:
-
build
Description copied from interface:ReplicationConnection.BuilderCreates a newReplicationConnectioninstance- Specified by:
buildin interfaceReplicationConnection.Builder- Returns:
- a connection, never null
-
withTypeRegistry
- Specified by:
withTypeRegistryin interfaceReplicationConnection.Builder
-
withSchema
Description copied from interface:ReplicationConnection.BuilderSets the schema instance- Specified by:
withSchemain interfaceReplicationConnection.Builder- Parameters:
schema- the schema, must not be null- Returns:
- this instance
-