Package io.debezium.connector.db2
Class Db2OffsetContext
- java.lang.Object
-
- io.debezium.connector.db2.Db2OffsetContext
-
- All Implemented Interfaces:
io.debezium.pipeline.spi.OffsetContext
public class Db2OffsetContext extends Object implements io.debezium.pipeline.spi.OffsetContext
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDb2OffsetContext.Loader
-
Field Summary
Fields Modifier and Type Field Description private static StringEVENT_SERIAL_NO_KEYprivate longeventSerialNoThe index of the current event within the current transaction.private io.debezium.pipeline.source.snapshot.incremental.IncrementalSnapshotContext<io.debezium.relational.TableId>incrementalSnapshotContextprivate Map<String,String>partitionprivate static StringSERVER_PARTITION_KEYprivate static StringSNAPSHOT_COMPLETED_KEYprivate booleansnapshotCompletedprivate SourceInfosourceInfoprivate org.apache.kafka.connect.data.SchemasourceInfoSchemaprivate io.debezium.pipeline.txmetadata.TransactionContexttransactionContext
-
Constructor Summary
Constructors Constructor Description Db2OffsetContext(Db2ConnectorConfig connectorConfig, TxLogPosition position, boolean snapshot, boolean snapshotCompleted)Db2OffsetContext(Db2ConnectorConfig connectorConfig, 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, Instant timestamp)TxLogPositiongetChangePosition()longgetEventSerialNo()io.debezium.pipeline.source.snapshot.incremental.IncrementalSnapshotContext<?>getIncrementalSnapshotContext()Map<String,?>getOffset()Map<String,?>getPartition()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(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
-
EVENT_SERIAL_NO_KEY
private static final String EVENT_SERIAL_NO_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 io.debezium.pipeline.txmetadata.TransactionContext transactionContext
-
incrementalSnapshotContext
private final io.debezium.pipeline.source.snapshot.incremental.IncrementalSnapshotContext<io.debezium.relational.TableId> incrementalSnapshotContext
-
eventSerialNo
private long eventSerialNo
The index of the current event within the current transaction.
-
-
Constructor Detail
-
Db2OffsetContext
public Db2OffsetContext(Db2ConnectorConfig connectorConfig, 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)
-
Db2OffsetContext
public Db2OffsetContext(Db2ConnectorConfig connectorConfig, TxLogPosition position, boolean snapshot, boolean snapshotCompleted)
-
-
Method Detail
-
getPartition
public Map<String,?> getPartition()
- Specified by:
getPartitionin interfaceio.debezium.pipeline.spi.OffsetContext
-
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 TxLogPosition getChangePosition()
-
getEventSerialNo
public long getEventSerialNo()
-
setChangePosition
public void setChangePosition(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, 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
-
-