Package io.debezium.connector.mongodb
Class MongoDbChangeSnapshotOplogRecordEmitter
java.lang.Object
io.debezium.pipeline.AbstractChangeRecordEmitter<MongoDbPartition,MongoDbCollectionSchema>
io.debezium.connector.mongodb.MongoDbChangeSnapshotOplogRecordEmitter
- All Implemented Interfaces:
ChangeRecordEmitter<MongoDbPartition>
public class MongoDbChangeSnapshotOplogRecordEmitter
extends AbstractChangeRecordEmitter<MongoDbPartition,MongoDbCollectionSchema>
Emits change data based on a collection document.
- Author:
- Chris Cranford
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.debezium.pipeline.spi.ChangeRecordEmitter
ChangeRecordEmitter.Receiver<P extends Partition> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanWhether this event originates from a snapshot.private static final Map<String,Envelope.Operation> private final org.bson.BsonDocument -
Constructor Summary
ConstructorsConstructorDescriptionMongoDbChangeSnapshotOplogRecordEmitter(MongoDbPartition partition, OffsetContext offsetContext, Clock clock, org.bson.BsonDocument oplogEvent, boolean isSnapshot) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcreateAndEmitChangeRecord(ChangeRecordEmitter.Receiver receiver, MongoDbCollectionSchema schema) protected voidemitCreateRecord(ChangeRecordEmitter.Receiver receiver, MongoDbCollectionSchema schema) protected voidemitDeleteRecord(ChangeRecordEmitter.Receiver receiver, MongoDbCollectionSchema schema) protected voidemitReadRecord(ChangeRecordEmitter.Receiver receiver, MongoDbCollectionSchema schema) protected voidemitUpdateRecord(ChangeRecordEmitter.Receiver receiver, MongoDbCollectionSchema schema) static booleanisValidOperation(String operation) Methods inherited from class io.debezium.pipeline.AbstractChangeRecordEmitter
emitChangeRecords, getClock, getOffset, getPartition
-
Field Details
-
oplogEvent
private final org.bson.BsonDocument oplogEvent -
isSnapshot
private final boolean isSnapshotWhether this event originates from a snapshot. -
OPERATION_LITERALS
-
-
Constructor Details
-
MongoDbChangeSnapshotOplogRecordEmitter
public MongoDbChangeSnapshotOplogRecordEmitter(MongoDbPartition partition, OffsetContext offsetContext, Clock clock, org.bson.BsonDocument oplogEvent, boolean isSnapshot)
-
-
Method Details
-
getOperation
-
emitReadRecord
protected void emitReadRecord(ChangeRecordEmitter.Receiver receiver, MongoDbCollectionSchema schema) throws InterruptedException - Specified by:
emitReadRecordin classAbstractChangeRecordEmitter<MongoDbPartition,MongoDbCollectionSchema> - Throws:
InterruptedException
-
emitCreateRecord
protected void emitCreateRecord(ChangeRecordEmitter.Receiver receiver, MongoDbCollectionSchema schema) throws InterruptedException - Specified by:
emitCreateRecordin classAbstractChangeRecordEmitter<MongoDbPartition,MongoDbCollectionSchema> - Throws:
InterruptedException
-
emitUpdateRecord
protected void emitUpdateRecord(ChangeRecordEmitter.Receiver receiver, MongoDbCollectionSchema schema) throws InterruptedException - Specified by:
emitUpdateRecordin classAbstractChangeRecordEmitter<MongoDbPartition,MongoDbCollectionSchema> - Throws:
InterruptedException
-
emitDeleteRecord
protected void emitDeleteRecord(ChangeRecordEmitter.Receiver receiver, MongoDbCollectionSchema schema) throws InterruptedException - Specified by:
emitDeleteRecordin classAbstractChangeRecordEmitter<MongoDbPartition,MongoDbCollectionSchema> - Throws:
InterruptedException
-
createAndEmitChangeRecord
private void createAndEmitChangeRecord(ChangeRecordEmitter.Receiver receiver, MongoDbCollectionSchema schema) throws InterruptedException - Throws:
InterruptedException
-
isValidOperation
-