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
Nested Classes Modifier and Type Interface Description static interface
ChangeRecordEmitter.Receiver<P extends Partition>
Callback passed toChangeRecordEmitter
s, allowing them to produce one or more change records.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
emitChangeRecords(DataCollectionSchema schema, ChangeRecordEmitter.Receiver<P> receiver)
Emits the change record(s) corresponding to data change represented by this emitter.OffsetContext
getOffset()
Returns the offset of the change record(s) emitted.Envelope.Operation
getOperation()
Returns the operation done by the represented change.P
getPartition()
Returns the partition of the change record(s) emitted.
-
-
-
Method Detail
-
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.
-
-