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
  • 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.
    • ignoreRecord

      default boolean ignoreRecord()
      Returns true if the record should be ignored.