Class PostgresOffsetContext

java.lang.Object
io.debezium.pipeline.CommonOffsetContext<SourceInfo>
io.debezium.connector.postgresql.PostgresOffsetContext
All Implemented Interfaces:
OffsetContext

public class PostgresOffsetContext extends CommonOffsetContext<SourceInfo>
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • LAST_COMPLETELY_PROCESSED_LSN_KEY

      public static final String LAST_COMPLETELY_PROCESSED_LSN_KEY
      See Also:
    • LAST_COMMIT_LSN_KEY

      public static final String LAST_COMMIT_LSN_KEY
      See Also:
    • sourceInfoSchema

      private final org.apache.kafka.connect.data.Schema sourceInfoSchema
    • lastSnapshotRecord

      private boolean lastSnapshotRecord
    • lastCompletelyProcessedLsn

      private Lsn lastCompletelyProcessedLsn
    • lastCommitLsn

      private Lsn lastCommitLsn
    • streamingStoppingLsn

      private Lsn streamingStoppingLsn
    • transactionContext

      private final TransactionContext transactionContext
    • incrementalSnapshotContext

      private final IncrementalSnapshotContext<TableId> incrementalSnapshotContext
  • Constructor Details

  • Method Details

    • getOffset

      public Map<String,?> getOffset()
    • getSourceInfoSchema

      public org.apache.kafka.connect.data.Schema getSourceInfoSchema()
    • isSnapshotRunning

      public boolean isSnapshotRunning()
    • preSnapshotStart

      public void preSnapshotStart()
    • preSnapshotCompletion

      public void preSnapshotCompletion()
    • updateWalPosition

      public void updateWalPosition(Lsn lsn, Lsn lastCompletelyProcessedLsn, Instant commitTime, Long txId, Long xmin, TableId tableId, ReplicationMessage.Operation messageType)
    • 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

      public void updateCommitPosition(Lsn lsn, Lsn lastCompletelyProcessedLsn)
    • 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

      public void setStreamingStoppingLsn(Lsn streamingStoppingLsn)
    • xmin

      Long xmin()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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

      public OffsetState asOffsetState()
    • event

      public void event(io.debezium.spi.schema.DataCollectionId tableId, Instant instant)
    • getTransactionContext

      public TransactionContext getTransactionContext()
    • getIncrementalSnapshotContext

      public IncrementalSnapshotContext<?> getIncrementalSnapshotContext()