Class ReplicaSetOffsetContext

java.lang.Object
io.debezium.pipeline.CommonOffsetContext<SourceInfo>
io.debezium.connector.mongodb.ReplicaSetOffsetContext
All Implemented Interfaces:
OffsetContext

@ThreadSafe public class ReplicaSetOffsetContext extends CommonOffsetContext<SourceInfo>
An OffsetContext implementation that is specific to a single ReplicaSet. The mongodb connector operates multiple threads during snapshot and streaming modes where each ReplicaSet is processed individually and the offsets that pertain to that ReplicaSet should be maintained in such a way that is considered thread-safe. This implementation offers such safety.
Author:
Chris Cranford
  • Field Details

  • Constructor Details

  • Method Details

    • getOffset

      public Map<String,?> getOffset()
    • getSourceInfoSchema

      public org.apache.kafka.connect.data.Schema getSourceInfoSchema()
    • isSnapshotRunning

      public boolean isSnapshotRunning()
    • preSnapshotStart

      public void preSnapshotStart()
    • preSnapshotCompletion

      public void preSnapshotCompletion()
    • event

      public void event(DataCollectionId collectionId, Instant timestamp)
    • getTransactionContext

      public TransactionContext getTransactionContext()
    • getReplicaSetName

      public String getReplicaSetName()
    • isSnapshotOngoing

      public boolean isSnapshotOngoing()
    • hasOffset

      public boolean hasOffset()
    • readEvent

      public void readEvent(CollectionId collectionId, Instant timestamp)
    • changeStreamEvent

      public void changeStreamEvent(com.mongodb.client.model.changestream.ChangeStreamDocument<org.bson.BsonDocument> changeStreamEvent)
    • lastOffsetTimestamp

      public org.bson.BsonTimestamp lastOffsetTimestamp()
    • lastResumeToken

      public String lastResumeToken()
    • getIncrementalSnapshotContext

      public IncrementalSnapshotContext<?> getIncrementalSnapshotContext()