Package io.debezium.connector.postgresql
Class PostgresTaskContext
- java.lang.Object
-
- io.debezium.connector.common.CdcSourceTaskContext
-
- io.debezium.connector.postgresql.PostgresTaskContext
-
@ThreadSafe public class PostgresTaskContext extends CdcSourceTaskContext
The context of aPostgresConnectorTask. This deals with most of the brunt of reading various configuration options and creating other objects with these various options.- Author:
- Horia Chiorean (hchiorea@redhat.com)
-
-
Field Summary
Fields Modifier and Type Field Description private PostgresConnectorConfigconfigprivate LonglastXminprotected static org.slf4j.LoggerLOGGERprivate ElapsedTimeStrategyrefreshXminprivate PostgresSchemaschemaprivate TopicSelector<TableId>topicSelector
-
Constructor Summary
Constructors Modifier Constructor Description protectedPostgresTaskContext(PostgresConnectorConfig config, PostgresSchema schema, TopicSelector<TableId> topicSelector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PostgresConnectorConfigconfig()protected ReplicationConnectioncreateReplicationConnection(boolean doSnapshot)(package private) PostgresConnectorConfiggetConfig()private SlotStategetCurrentSlotState(PostgresConnection connection)(package private) LonggetSlotXmin(PostgresConnection connection)protected voidrefreshSchema(PostgresConnection connection, boolean printReplicaIdentityInfo)protected PostgresSchemaschema()protected TopicSelector<TableId>topicSelector()-
Methods inherited from class io.debezium.connector.common.CdcSourceTaskContext
capturedDataCollections, configureLoggingContext, getClock, getConnectorName, getConnectorType, temporaryLoggingContext
-
-
-
-
Field Detail
-
LOGGER
protected static final org.slf4j.Logger LOGGER
-
config
private final PostgresConnectorConfig config
-
topicSelector
private final TopicSelector<TableId> topicSelector
-
schema
private final PostgresSchema schema
-
refreshXmin
private ElapsedTimeStrategy refreshXmin
-
lastXmin
private Long lastXmin
-
-
Constructor Detail
-
PostgresTaskContext
protected PostgresTaskContext(PostgresConnectorConfig config, PostgresSchema schema, TopicSelector<TableId> topicSelector)
-
-
Method Detail
-
topicSelector
protected TopicSelector<TableId> topicSelector()
-
schema
protected PostgresSchema schema()
-
config
protected PostgresConnectorConfig config()
-
refreshSchema
protected void refreshSchema(PostgresConnection connection, boolean printReplicaIdentityInfo) throws SQLException
- Throws:
SQLException
-
getSlotXmin
Long getSlotXmin(PostgresConnection connection) throws SQLException
- Throws:
SQLException
-
getCurrentSlotState
private SlotState getCurrentSlotState(PostgresConnection connection) throws SQLException
- Throws:
SQLException
-
createReplicationConnection
protected ReplicationConnection createReplicationConnection(boolean doSnapshot) throws SQLException
- Throws:
SQLException
-
getConfig
PostgresConnectorConfig getConfig()
-
-