Package io.debezium.connector.postgresql
Class PostgresObjectUtils
- java.lang.Object
-
- io.debezium.connector.postgresql.PostgresObjectUtils
-
public class PostgresObjectUtils extends Object
A factory for creating various Debezium objectsIt is a hack to access package-private constructor in debezium.
-
-
Constructor Summary
Constructors Constructor Description PostgresObjectUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static io.debezium.connector.postgresql.connection.ReplicationConnectioncreateReplicationConnection(io.debezium.connector.postgresql.PostgresTaskContext taskContext, PostgresConnection postgresConnection, boolean doSnapshot, io.debezium.connector.postgresql.PostgresConnectorConfig connectorConfig)static io.debezium.connector.postgresql.PostgresEventMetadataProvidernewEventMetadataProvider()static PostgresConnection.PostgresValueConverterBuildernewPostgresValueConverterBuilder(io.debezium.connector.postgresql.PostgresConnectorConfig config)Create a new PostgresVauleConverterBuilder instance and offer type registry for JDBC connection.static RelationAwarePostgresSchemanewSchema(PostgresConnection connection, io.debezium.connector.postgresql.PostgresConnectorConfig config, io.debezium.connector.postgresql.TypeRegistry typeRegistry, io.debezium.schema.TopicSelector<io.debezium.relational.TableId> topicSelector, io.debezium.connector.postgresql.PostgresValueConverter valueConverter)Create a new PostgresSchema and initialize the content of the schema.static RelationAwarePostgresSchemanewSchema(PostgresConnection connection, io.debezium.connector.postgresql.PostgresConnectorConfig config, io.debezium.connector.postgresql.TypeRegistry typeRegistry, io.debezium.schema.TopicSelector<io.debezium.relational.TableId> topicSelector, io.debezium.connector.postgresql.PostgresValueConverter valueConverter, Collection<io.debezium.relational.history.TableChanges.TableChange> tableChanges)static io.debezium.connector.postgresql.PostgresTaskContextnewTaskContext(io.debezium.connector.postgresql.PostgresConnectorConfig connectorConfig, io.debezium.connector.postgresql.PostgresSchema schema, io.debezium.schema.TopicSelector<io.debezium.relational.TableId> topicSelector)static voidwaitForReplicationSlotReady(int retryTimes, PostgresConnection jdbcConnection, String slotName, String pluginName)
-
-
-
Method Detail
-
newSchema
public static RelationAwarePostgresSchema newSchema(PostgresConnection connection, io.debezium.connector.postgresql.PostgresConnectorConfig config, io.debezium.connector.postgresql.TypeRegistry typeRegistry, io.debezium.schema.TopicSelector<io.debezium.relational.TableId> topicSelector, io.debezium.connector.postgresql.PostgresValueConverter valueConverter) throws SQLException
Create a new PostgresSchema and initialize the content of the schema.- Throws:
SQLException
-
newSchema
public static RelationAwarePostgresSchema newSchema(PostgresConnection connection, io.debezium.connector.postgresql.PostgresConnectorConfig config, io.debezium.connector.postgresql.TypeRegistry typeRegistry, io.debezium.schema.TopicSelector<io.debezium.relational.TableId> topicSelector, io.debezium.connector.postgresql.PostgresValueConverter valueConverter, Collection<io.debezium.relational.history.TableChanges.TableChange> tableChanges) throws SQLException
- Throws:
SQLException
-
newTaskContext
public static io.debezium.connector.postgresql.PostgresTaskContext newTaskContext(io.debezium.connector.postgresql.PostgresConnectorConfig connectorConfig, io.debezium.connector.postgresql.PostgresSchema schema, io.debezium.schema.TopicSelector<io.debezium.relational.TableId> topicSelector)
-
newEventMetadataProvider
public static io.debezium.connector.postgresql.PostgresEventMetadataProvider newEventMetadataProvider()
-
newPostgresValueConverterBuilder
public static PostgresConnection.PostgresValueConverterBuilder newPostgresValueConverterBuilder(io.debezium.connector.postgresql.PostgresConnectorConfig config)
Create a new PostgresVauleConverterBuilder instance and offer type registry for JDBC connection.It is created in this package because some methods (e.g., includeUnknownDatatypes) of PostgresConnectorConfig is protected.
-
createReplicationConnection
public static io.debezium.connector.postgresql.connection.ReplicationConnection createReplicationConnection(io.debezium.connector.postgresql.PostgresTaskContext taskContext, PostgresConnection postgresConnection, boolean doSnapshot, io.debezium.connector.postgresql.PostgresConnectorConfig connectorConfig)
-
waitForReplicationSlotReady
public static void waitForReplicationSlotReady(int retryTimes, PostgresConnection jdbcConnection, String slotName, String pluginName) throws SQLException- Throws:
SQLException
-
-