Package io.debezium.connector.sqlserver
Class SqlServerOffsetContext
- java.lang.Object
-
- io.debezium.connector.sqlserver.SqlServerOffsetContext
-
- All Implemented Interfaces:
OffsetContext
public class SqlServerOffsetContext extends Object implements OffsetContext
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSqlServerOffsetContext.Loader
-
Field Summary
Fields Modifier and Type Field Description private longeventSerialNoThe index of the current event within the current transaction.private IncrementalSnapshotContext<TableId>incrementalSnapshotContextprivate Map<String,String>partitionprivate static StringSERVER_PARTITION_KEYprivate static StringSNAPSHOT_COMPLETED_KEYprivate booleansnapshotCompletedprivate SourceInfosourceInfoprivate org.apache.kafka.connect.data.SchemasourceInfoSchemaprivate TransactionContexttransactionContext
-
Constructor Summary
Constructors Constructor Description SqlServerOffsetContext(SqlServerConnectorConfig connectorConfig, TxLogPosition position, boolean snapshot, boolean snapshotCompleted)SqlServerOffsetContext(SqlServerConnectorConfig connectorConfig, TxLogPosition position, boolean snapshot, boolean snapshotCompleted, long eventSerialNo, TransactionContext transactionContext, IncrementalSnapshotContext<TableId> incrementalSnapshotContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidevent(DataCollectionId tableId, Instant timestamp)TxLogPositiongetChangePosition()longgetEventSerialNo()IncrementalSnapshotContext<?>getIncrementalSnapshotContext()Map<String,?>getOffset()Map<String,?>getPartition()org.apache.kafka.connect.data.StructgetSourceInfo()org.apache.kafka.connect.data.SchemagetSourceInfoSchema()TransactionContextgetTransactionContext()voidincrementalSnapshotEvents()booleanisSnapshotCompleted()booleanisSnapshotRunning()voidmarkLastSnapshotRecord()voidpostSnapshotCompletion()voidpreSnapshotCompletion()voidpreSnapshotStart()voidsetChangePosition(TxLogPosition position, int eventCount)StringtoString()
-
-
-
Field Detail
-
SERVER_PARTITION_KEY
private static final String SERVER_PARTITION_KEY
- See Also:
- Constant Field Values
-
SNAPSHOT_COMPLETED_KEY
private static final String SNAPSHOT_COMPLETED_KEY
- See Also:
- Constant Field Values
-
sourceInfoSchema
private final org.apache.kafka.connect.data.Schema sourceInfoSchema
-
sourceInfo
private final SourceInfo sourceInfo
-
snapshotCompleted
private boolean snapshotCompleted
-
transactionContext
private final TransactionContext transactionContext
-
incrementalSnapshotContext
private final IncrementalSnapshotContext<TableId> incrementalSnapshotContext
-
eventSerialNo
private long eventSerialNo
The index of the current event within the current transaction.
-
-
Constructor Detail
-
SqlServerOffsetContext
public SqlServerOffsetContext(SqlServerConnectorConfig connectorConfig, TxLogPosition position, boolean snapshot, boolean snapshotCompleted, long eventSerialNo, TransactionContext transactionContext, IncrementalSnapshotContext<TableId> incrementalSnapshotContext)
-
SqlServerOffsetContext
public SqlServerOffsetContext(SqlServerConnectorConfig connectorConfig, TxLogPosition position, boolean snapshot, boolean snapshotCompleted)
-
-
Method Detail
-
getPartition
public Map<String,?> getPartition()
- Specified by:
getPartitionin interfaceOffsetContext
-
getOffset
public Map<String,?> getOffset()
- Specified by:
getOffsetin interfaceOffsetContext
-
getSourceInfoSchema
public org.apache.kafka.connect.data.Schema getSourceInfoSchema()
- Specified by:
getSourceInfoSchemain interfaceOffsetContext
-
getSourceInfo
public org.apache.kafka.connect.data.Struct getSourceInfo()
- Specified by:
getSourceInfoin interfaceOffsetContext
-
getChangePosition
public TxLogPosition getChangePosition()
-
getEventSerialNo
public long getEventSerialNo()
-
setChangePosition
public void setChangePosition(TxLogPosition position, int eventCount)
-
isSnapshotRunning
public boolean isSnapshotRunning()
- Specified by:
isSnapshotRunningin interfaceOffsetContext
-
isSnapshotCompleted
public boolean isSnapshotCompleted()
-
preSnapshotStart
public void preSnapshotStart()
- Specified by:
preSnapshotStartin interfaceOffsetContext
-
preSnapshotCompletion
public void preSnapshotCompletion()
- Specified by:
preSnapshotCompletionin interfaceOffsetContext
-
postSnapshotCompletion
public void postSnapshotCompletion()
- Specified by:
postSnapshotCompletionin interfaceOffsetContext
-
markLastSnapshotRecord
public void markLastSnapshotRecord()
- Specified by:
markLastSnapshotRecordin interfaceOffsetContext
-
event
public void event(DataCollectionId tableId, Instant timestamp)
- Specified by:
eventin interfaceOffsetContext
-
getTransactionContext
public TransactionContext getTransactionContext()
- Specified by:
getTransactionContextin interfaceOffsetContext
-
incrementalSnapshotEvents
public void incrementalSnapshotEvents()
- Specified by:
incrementalSnapshotEventsin interfaceOffsetContext
-
getIncrementalSnapshotContext
public IncrementalSnapshotContext<?> getIncrementalSnapshotContext()
- Specified by:
getIncrementalSnapshotContextin interfaceOffsetContext
-
-