Package io.debezium.pipeline
Class AbstractChangeRecordEmitter<P extends Partition,T extends DataCollectionSchema>
java.lang.Object
io.debezium.pipeline.AbstractChangeRecordEmitter<P,T>
- All Implemented Interfaces:
ChangeRecordEmitter<P>
- Direct Known Subclasses:
RelationalChangeRecordEmitter
public abstract class AbstractChangeRecordEmitter<P extends Partition,T extends DataCollectionSchema>
extends Object
implements ChangeRecordEmitter<P>
An abstract implementation of
ChangeRecordEmitter.- Author:
- Chris Cranford
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.debezium.pipeline.spi.ChangeRecordEmitter
ChangeRecordEmitter.Receiver<P extends Partition> -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractChangeRecordEmitter(P partition, OffsetContext offsetContext, Clock clock) -
Method Summary
Modifier and TypeMethodDescriptionvoidemitChangeRecords(DataCollectionSchema schema, ChangeRecordEmitter.Receiver<P> receiver) Emits the change record(s) corresponding to data change represented by this emitter.protected abstract voidemitCreateRecord(ChangeRecordEmitter.Receiver<P> receiver, T schema) Emits change record(s) associated with an insert operation.protected abstract voidemitDeleteRecord(ChangeRecordEmitter.Receiver<P> receiver, T schema) Emits change record(s) associated with a delete operation.protected abstract voidemitReadRecord(ChangeRecordEmitter.Receiver<P> receiver, T schema) Emits change record(s) associated with a snapshot.protected abstract voidemitUpdateRecord(ChangeRecordEmitter.Receiver<P> receiver, T schema) Emits change record(s) associated with an update operation.getClock()Returns the clock of the change record(s) emitted.Returns the offset of the change record(s) emitted.Returns the partition of the change record(s) emitted.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.debezium.pipeline.spi.ChangeRecordEmitter
getOperation
-
Field Details
-
partition
-
offsetContext
-
clock
-
-
Constructor Details
-
AbstractChangeRecordEmitter
-
-
Method Details
-
emitChangeRecords
public void emitChangeRecords(DataCollectionSchema schema, ChangeRecordEmitter.Receiver<P> receiver) throws InterruptedException Description copied from interface:ChangeRecordEmitterEmits the change record(s) corresponding to data change represented by this emitter.- Specified by:
emitChangeRecordsin interfaceChangeRecordEmitter<P extends Partition>- Throws:
InterruptedException
-
getPartition
Description copied from interface:ChangeRecordEmitterReturns the partition of the change record(s) emitted.- Specified by:
getPartitionin interfaceChangeRecordEmitter<P extends Partition>
-
getOffset
Description copied from interface:ChangeRecordEmitterReturns the offset of the change record(s) emitted.- Specified by:
getOffsetin interfaceChangeRecordEmitter<P extends Partition>
-
getClock
Returns the clock of the change record(s) emitted. -
emitReadRecord
protected abstract void emitReadRecord(ChangeRecordEmitter.Receiver<P> receiver, T schema) throws InterruptedException Emits change record(s) associated with a snapshot.- Parameters:
receiver- the handler for which the emitted record should be dispatchedschema- the schema- Throws:
InterruptedException
-
emitCreateRecord
protected abstract void emitCreateRecord(ChangeRecordEmitter.Receiver<P> receiver, T schema) throws InterruptedException Emits change record(s) associated with an insert operation.- Parameters:
receiver- the handler for which the emitted record should be dispatchedschema- the schema- Throws:
InterruptedException
-
emitUpdateRecord
protected abstract void emitUpdateRecord(ChangeRecordEmitter.Receiver<P> receiver, T schema) throws InterruptedException Emits change record(s) associated with an update operation.- Parameters:
receiver- the handler for which the emitted record should be dispatchedschema- the schema- Throws:
InterruptedException
-
emitDeleteRecord
protected abstract void emitDeleteRecord(ChangeRecordEmitter.Receiver<P> receiver, T schema) throws InterruptedException Emits change record(s) associated with a delete operation.- Parameters:
receiver- the handler for which the emitted record should be dispatchedschema- the schema- Throws:
InterruptedException
-