Package io.debezium.connector.postgresql
Class PostgresOffsetContext
java.lang.Object
io.debezium.pipeline.CommonOffsetContext<SourceInfo>
io.debezium.connector.postgresql.PostgresOffsetContext
- All Implemented Interfaces:
OffsetContext
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IncrementalSnapshotContext<TableId>static final Stringstatic final Stringprivate Lsnprivate Lsnprivate booleanprivate static final org.slf4j.Loggerprivate final org.apache.kafka.connect.data.Schemaprivate Lsnprivate final TransactionContextFields inherited from class io.debezium.pipeline.CommonOffsetContext
sourceInfo -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePostgresOffsetContext(PostgresConnectorConfig connectorConfig, Lsn lsn, Lsn lastCompletelyProcessedLsn, Lsn lastCommitLsn, Long txId, ReplicationMessage.Operation messageType, Instant time, boolean snapshot, boolean lastSnapshotRecord, TransactionContext transactionContext, IncrementalSnapshotContext<TableId> incrementalSnapshotContext) -
Method Summary
Modifier and TypeMethodDescriptionvoidorg.apache.kafka.connect.data.Schema(package private) LsnReturns the LSN that the streaming phase should stream events up to or null if a stopping point is not set.(package private) boolean(package private) booleanstatic PostgresOffsetContextinitialContext(PostgresConnectorConfig connectorConfig, PostgresConnection jdbcConnection, Clock clock) static PostgresOffsetContextinitialContext(PostgresConnectorConfig connectorConfig, PostgresConnection jdbcConnection, Clock clock, Lsn lastCommitLsn, Lsn lastCompletelyProcessedLsn) boolean(package private) Lsn(package private) Lsn(package private) ReplicationMessage.Operation(package private) Lsnlsn()voidvoidvoidsetStreamingStoppingLsn(Lsn streamingStoppingLsn) toString()voidupdateCommitPosition(Lsn lsn, Lsn lastCompletelyProcessedLsn) voidupdateWalPosition(Lsn lsn, Lsn lastCompletelyProcessedLsn, Instant commitTime, Long txId, Long xmin, ReplicationMessage.Operation messageType) update wal position for lsn events that do not have an associated table or schemavoidupdateWalPosition(Lsn lsn, Lsn lastCompletelyProcessedLsn, Instant commitTime, Long txId, Long xmin, TableId tableId, ReplicationMessage.Operation messageType) (package private) Longxmin()Methods inherited from class io.debezium.pipeline.CommonOffsetContext
getSourceInfo, incrementalSnapshotEvents, markSnapshotRecord, postSnapshotCompletion
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
LAST_COMPLETELY_PROCESSED_LSN_KEY
- See Also:
-
LAST_COMMIT_LSN_KEY
- See Also:
-
sourceInfoSchema
private final org.apache.kafka.connect.data.Schema sourceInfoSchema -
lastSnapshotRecord
private boolean lastSnapshotRecord -
lastCompletelyProcessedLsn
-
lastCommitLsn
-
streamingStoppingLsn
-
transactionContext
-
incrementalSnapshotContext
-
-
Constructor Details
-
PostgresOffsetContext
private PostgresOffsetContext(PostgresConnectorConfig connectorConfig, Lsn lsn, Lsn lastCompletelyProcessedLsn, Lsn lastCommitLsn, Long txId, ReplicationMessage.Operation messageType, Instant time, boolean snapshot, boolean lastSnapshotRecord, TransactionContext transactionContext, IncrementalSnapshotContext<TableId> incrementalSnapshotContext)
-
-
Method Details
-
getOffset
-
getSourceInfoSchema
public org.apache.kafka.connect.data.Schema getSourceInfoSchema() -
isSnapshotRunning
public boolean isSnapshotRunning() -
preSnapshotStart
public void preSnapshotStart() -
preSnapshotCompletion
public void preSnapshotCompletion() -
updateWalPosition
-
updateWalPosition
public void updateWalPosition(Lsn lsn, Lsn lastCompletelyProcessedLsn, Instant commitTime, Long txId, Long xmin, ReplicationMessage.Operation messageType) update wal position for lsn events that do not have an associated table or schema -
updateCommitPosition
-
hasLastKnownPosition
boolean hasLastKnownPosition() -
hasCompletelyProcessedPosition
boolean hasCompletelyProcessedPosition() -
lsn
Lsn lsn() -
lastCompletelyProcessedLsn
Lsn lastCompletelyProcessedLsn() -
lastCommitLsn
Lsn lastCommitLsn() -
lastProcessedMessageType
ReplicationMessage.Operation lastProcessedMessageType() -
getStreamingStoppingLsn
Lsn getStreamingStoppingLsn()Returns the LSN that the streaming phase should stream events up to or null if a stopping point is not set. If set during the streaming phase, any event with an LSN less than the stopping LSN will be processed and once the stopping LSN is reached, the streaming phase will end. Useful for a pre-snapshot catch up streaming phase. -
setStreamingStoppingLsn
-
xmin
Long xmin() -
toString
-
initialContext
public static PostgresOffsetContext initialContext(PostgresConnectorConfig connectorConfig, PostgresConnection jdbcConnection, Clock clock) -
initialContext
public static PostgresOffsetContext initialContext(PostgresConnectorConfig connectorConfig, PostgresConnection jdbcConnection, Clock clock, Lsn lastCommitLsn, Lsn lastCompletelyProcessedLsn) -
asOffsetState
-
event
-
getTransactionContext
-
getIncrementalSnapshotContext
-