Package io.debezium.pipeline.spi
Interface ChangeRecordEmitter<P extends Partition>
- All Known Implementing Classes:
AbstractChangeRecordEmitter
,RelationalChangeRecordEmitter
,SnapshotChangeRecordEmitter
public interface ChangeRecordEmitter<P extends Partition>
Represents a change applied to a source database and emits one or more corresponding change records. In most cases,
there'll be one change record for one source change, but e.g. in case of updates involving a record's PK, it may
result in a deletion and re-insertion record.
- Author:
- Gunnar Morling
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
ChangeRecordEmitter.Receiver<P extends Partition>
Callback passed toChangeRecordEmitter
s, allowing them to produce one or more change records. -
Method Summary
Modifier and TypeMethodDescriptionvoid
emitChangeRecords
(DataCollectionSchema schema, ChangeRecordEmitter.Receiver<P> receiver) Emits the change record(s) corresponding to data change represented by this emitter.Returns the offset of the change record(s) emitted.Returns the operation done by the represented change.Returns the partition of the change record(s) emitted.
-
Method Details
-
emitChangeRecords
void emitChangeRecords(DataCollectionSchema schema, ChangeRecordEmitter.Receiver<P> receiver) throws InterruptedException Emits the change record(s) corresponding to data change represented by this emitter.- Throws:
InterruptedException
-
getPartition
P getPartition()Returns the partition of the change record(s) emitted. -
getOffset
OffsetContext getOffset()Returns the offset of the change record(s) emitted. -
getOperation
Envelope.Operation getOperation()Returns the operation done by the represented change.
-