Class SqlServerOffsetContext

  • All Implemented Interfaces:
    io.debezium.pipeline.spi.OffsetContext

    public class SqlServerOffsetContext
    extends Object
    implements io.debezium.pipeline.spi.OffsetContext
    Copied from Debezium project(1.9.8.final) to modify the io.debezium.connector.sqlserver.SqlServerOffsetContext.Loader#load(java.util.Map) method. The original method is not able to get the eventSerialNo from the offset map which stores as string.
    • Constructor Detail

      • SqlServerOffsetContext

        public SqlServerOffsetContext​(io.debezium.connector.sqlserver.SqlServerConnectorConfig connectorConfig,
                                      io.debezium.connector.sqlserver.TxLogPosition position,
                                      boolean snapshot,
                                      boolean snapshotCompleted,
                                      long eventSerialNo,
                                      io.debezium.pipeline.txmetadata.TransactionContext transactionContext,
                                      io.debezium.pipeline.source.snapshot.incremental.IncrementalSnapshotContext<io.debezium.relational.TableId> incrementalSnapshotContext)
      • SqlServerOffsetContext

        public SqlServerOffsetContext​(io.debezium.connector.sqlserver.SqlServerConnectorConfig connectorConfig,
                                      io.debezium.connector.sqlserver.TxLogPosition position,
                                      boolean snapshot,
                                      boolean snapshotCompleted)
    • Method Detail

      • getOffset

        public Map<String,​?> getOffset()
        Specified by:
        getOffset in interface io.debezium.pipeline.spi.OffsetContext
      • getSourceInfoSchema

        public org.apache.kafka.connect.data.Schema getSourceInfoSchema()
        Specified by:
        getSourceInfoSchema in interface io.debezium.pipeline.spi.OffsetContext
      • getSourceInfo

        public org.apache.kafka.connect.data.Struct getSourceInfo()
        Specified by:
        getSourceInfo in interface io.debezium.pipeline.spi.OffsetContext
      • getChangePosition

        public io.debezium.connector.sqlserver.TxLogPosition getChangePosition()
      • getEventSerialNo

        public long getEventSerialNo()
      • setChangePosition

        public void setChangePosition​(io.debezium.connector.sqlserver.TxLogPosition position,
                                      int eventCount)
      • isSnapshotRunning

        public boolean isSnapshotRunning()
        Specified by:
        isSnapshotRunning in interface io.debezium.pipeline.spi.OffsetContext
      • isSnapshotCompleted

        public boolean isSnapshotCompleted()
      • preSnapshotStart

        public void preSnapshotStart()
        Specified by:
        preSnapshotStart in interface io.debezium.pipeline.spi.OffsetContext
      • preSnapshotCompletion

        public void preSnapshotCompletion()
        Specified by:
        preSnapshotCompletion in interface io.debezium.pipeline.spi.OffsetContext
      • postSnapshotCompletion

        public void postSnapshotCompletion()
        Specified by:
        postSnapshotCompletion in interface io.debezium.pipeline.spi.OffsetContext
      • markLastSnapshotRecord

        public void markLastSnapshotRecord()
        Specified by:
        markLastSnapshotRecord in interface io.debezium.pipeline.spi.OffsetContext
      • event

        public void event​(io.debezium.schema.DataCollectionId tableId,
                          java.time.Instant timestamp)
        Specified by:
        event in interface io.debezium.pipeline.spi.OffsetContext
      • getTransactionContext

        public io.debezium.pipeline.txmetadata.TransactionContext getTransactionContext()
        Specified by:
        getTransactionContext in interface io.debezium.pipeline.spi.OffsetContext
      • incrementalSnapshotEvents

        public void incrementalSnapshotEvents()
        Specified by:
        incrementalSnapshotEvents in interface io.debezium.pipeline.spi.OffsetContext
      • getIncrementalSnapshotContext

        public io.debezium.pipeline.source.snapshot.incremental.IncrementalSnapshotContext<?> getIncrementalSnapshotContext()
        Specified by:
        getIncrementalSnapshotContext in interface io.debezium.pipeline.spi.OffsetContext