public abstract class RelationalChangeRecordEmitter extends AbstractChangeRecordEmitter<TableSchema>
ChangeRecordEmitter implementations based on a relational database.ChangeRecordEmitter.Receiver| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
logger |
static String |
PK_UPDATE_NEWKEY_FIELD |
static String |
PK_UPDATE_OLDKEY_FIELD |
| Constructor and Description |
|---|
RelationalChangeRecordEmitter(OffsetContext offsetContext,
Clock clock) |
| Modifier and Type | Method and Description |
|---|---|
void |
emitChangeRecords(DataCollectionSchema schema,
ChangeRecordEmitter.Receiver receiver)
Emits the change record(s) corresponding to data change represented by this emitter.
|
protected void |
emitCreateRecord(ChangeRecordEmitter.Receiver receiver,
TableSchema tableSchema)
Emits change record(s) associated with an insert operation.
|
protected void |
emitDeleteRecord(ChangeRecordEmitter.Receiver receiver,
TableSchema tableSchema)
Emits change record(s) associated with a delete operation.
|
protected void |
emitReadRecord(ChangeRecordEmitter.Receiver receiver,
TableSchema tableSchema)
Emits change record(s) associated with a snapshot.
|
protected void |
emitUpdateRecord(ChangeRecordEmitter.Receiver receiver,
TableSchema tableSchema)
Emits change record(s) associated with an update operation.
|
protected abstract Object[] |
getNewColumnValues()
Returns the new row state in case of a CREATE or READ.
|
protected abstract Object[] |
getOldColumnValues()
Returns the old row state in case of an UPDATE or DELETE.
|
protected abstract Envelope.Operation |
getOperation()
Returns the operation done by the represented change.
|
protected boolean |
skipEmptyMessages()
Whether empty data messages should be ignored.
|
getClock, getOffsetpublic static final String PK_UPDATE_OLDKEY_FIELD
public static final String PK_UPDATE_NEWKEY_FIELD
protected final org.slf4j.Logger logger
public RelationalChangeRecordEmitter(OffsetContext offsetContext, Clock clock)
public void emitChangeRecords(DataCollectionSchema schema, ChangeRecordEmitter.Receiver receiver) throws InterruptedException
ChangeRecordEmitteremitChangeRecords in interface ChangeRecordEmitteremitChangeRecords in class AbstractChangeRecordEmitter<TableSchema>InterruptedExceptionprotected void emitCreateRecord(ChangeRecordEmitter.Receiver receiver, TableSchema tableSchema) throws InterruptedException
AbstractChangeRecordEmitteremitCreateRecord in class AbstractChangeRecordEmitter<TableSchema>receiver - the handler for which the emitted record should be dispatchedtableSchema - the schemaInterruptedExceptionprotected void emitReadRecord(ChangeRecordEmitter.Receiver receiver, TableSchema tableSchema) throws InterruptedException
AbstractChangeRecordEmitteremitReadRecord in class AbstractChangeRecordEmitter<TableSchema>receiver - the handler for which the emitted record should be dispatchedtableSchema - the schemaInterruptedExceptionprotected void emitUpdateRecord(ChangeRecordEmitter.Receiver receiver, TableSchema tableSchema) throws InterruptedException
AbstractChangeRecordEmitteremitUpdateRecord in class AbstractChangeRecordEmitter<TableSchema>receiver - the handler for which the emitted record should be dispatchedtableSchema - the schemaInterruptedExceptionprotected void emitDeleteRecord(ChangeRecordEmitter.Receiver receiver, TableSchema tableSchema) throws InterruptedException
AbstractChangeRecordEmitteremitDeleteRecord in class AbstractChangeRecordEmitter<TableSchema>receiver - the handler for which the emitted record should be dispatchedtableSchema - the schemaInterruptedExceptionprotected abstract Envelope.Operation getOperation()
getOperation in class AbstractChangeRecordEmitter<TableSchema>protected abstract Object[] getOldColumnValues()
protected abstract Object[] getNewColumnValues()
protected boolean skipEmptyMessages()
Copyright © 2020 JBoss by Red Hat. All rights reserved.