Class SpannerOffsetContext

java.lang.Object
io.debezium.connector.spanner.context.offset.SpannerOffsetContext
All Implemented Interfaces:
io.debezium.pipeline.spi.OffsetContext

public class SpannerOffsetContext extends Object implements io.debezium.pipeline.spi.OffsetContext
Implementation of OffsetContext. Updates offset from DataChangeEvent, HeartbeatEvent, ChildPartitionsEvent events
  • Field Details

    • sourceInfo

      private final SourceInfo sourceInfo
    • transactionContext

      private final io.debezium.pipeline.txmetadata.TransactionContext transactionContext
    • partitionOffset

      private final PartitionOffset partitionOffset
  • Constructor Details

    • SpannerOffsetContext

      public SpannerOffsetContext(SourceInfo sourceInfo, PartitionOffset partitionOffset, io.debezium.pipeline.txmetadata.TransactionContext transactionContext)
    • SpannerOffsetContext

      public SpannerOffsetContext(PartitionOffset partitionOffset, io.debezium.pipeline.txmetadata.TransactionContext transactionContext)
  • Method Details

    • 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
    • isSnapshotRunning

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

      public void markSnapshotRecord(io.debezium.connector.SnapshotRecord record)
      Specified by:
      markSnapshotRecord in interface io.debezium.pipeline.spi.OffsetContext
    • 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
    • event

      public void event(io.debezium.spi.schema.DataCollectionId dataCollectionId, Instant instant)
      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
    • getOffset

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