Package io.debezium.connector.sqlserver
Class SqlServerOffsetContext
- java.lang.Object
-
- io.debezium.connector.sqlserver.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSqlServerOffsetContext.Loader
-
Constructor Summary
Constructors Constructor Description SqlServerOffsetContext(io.debezium.connector.sqlserver.SqlServerConnectorConfig connectorConfig, io.debezium.connector.sqlserver.TxLogPosition position, boolean snapshot, boolean snapshotCompleted)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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidevent(io.debezium.schema.DataCollectionId tableId, java.time.Instant timestamp)io.debezium.connector.sqlserver.TxLogPositiongetChangePosition()longgetEventSerialNo()io.debezium.pipeline.source.snapshot.incremental.IncrementalSnapshotContext<?>getIncrementalSnapshotContext()Map<String,?>getOffset()org.apache.kafka.connect.data.StructgetSourceInfo()org.apache.kafka.connect.data.SchemagetSourceInfoSchema()io.debezium.pipeline.txmetadata.TransactionContextgetTransactionContext()voidincrementalSnapshotEvents()booleanisSnapshotCompleted()booleanisSnapshotRunning()voidmarkLastSnapshotRecord()voidpostSnapshotCompletion()voidpreSnapshotCompletion()voidpreSnapshotStart()voidsetChangePosition(io.debezium.connector.sqlserver.TxLogPosition position, int eventCount)StringtoString()
-
-
-
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:
getOffsetin interfaceio.debezium.pipeline.spi.OffsetContext
-
getSourceInfoSchema
public org.apache.kafka.connect.data.Schema getSourceInfoSchema()
- Specified by:
getSourceInfoSchemain interfaceio.debezium.pipeline.spi.OffsetContext
-
getSourceInfo
public org.apache.kafka.connect.data.Struct getSourceInfo()
- Specified by:
getSourceInfoin interfaceio.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:
isSnapshotRunningin interfaceio.debezium.pipeline.spi.OffsetContext
-
isSnapshotCompleted
public boolean isSnapshotCompleted()
-
preSnapshotStart
public void preSnapshotStart()
- Specified by:
preSnapshotStartin interfaceio.debezium.pipeline.spi.OffsetContext
-
preSnapshotCompletion
public void preSnapshotCompletion()
- Specified by:
preSnapshotCompletionin interfaceio.debezium.pipeline.spi.OffsetContext
-
postSnapshotCompletion
public void postSnapshotCompletion()
- Specified by:
postSnapshotCompletionin interfaceio.debezium.pipeline.spi.OffsetContext
-
markLastSnapshotRecord
public void markLastSnapshotRecord()
- Specified by:
markLastSnapshotRecordin interfaceio.debezium.pipeline.spi.OffsetContext
-
event
public void event(io.debezium.schema.DataCollectionId tableId, java.time.Instant timestamp)- Specified by:
eventin interfaceio.debezium.pipeline.spi.OffsetContext
-
getTransactionContext
public io.debezium.pipeline.txmetadata.TransactionContext getTransactionContext()
- Specified by:
getTransactionContextin interfaceio.debezium.pipeline.spi.OffsetContext
-
incrementalSnapshotEvents
public void incrementalSnapshotEvents()
- Specified by:
incrementalSnapshotEventsin interfaceio.debezium.pipeline.spi.OffsetContext
-
getIncrementalSnapshotContext
public io.debezium.pipeline.source.snapshot.incremental.IncrementalSnapshotContext<?> getIncrementalSnapshotContext()
- Specified by:
getIncrementalSnapshotContextin interfaceio.debezium.pipeline.spi.OffsetContext
-
-