public final class RecordMakers.RecordsForTable extends Object
SourceRecord factory for a specific table and consumer.| Modifier and Type | Field and Description |
|---|---|
private BlockingConsumer<org.apache.kafka.connect.source.SourceRecord> |
consumer |
private RecordMakers.Converter |
converter |
private BitSet |
includedColumns |
| Modifier | Constructor and Description |
|---|---|
protected |
RecordsForTable(RecordMakers.Converter converter,
BitSet includedColumns,
BlockingConsumer<org.apache.kafka.connect.source.SourceRecord> consumer) |
| Modifier and Type | Method and Description |
|---|---|
int |
create(Object[] row,
Instant ts)
Produce a
create record for the row. |
int |
create(Object[] row,
Instant ts,
int rowNumber,
int numberOfRows)
Produce a
create record for the row. |
int |
delete(Object[] row,
Instant ts)
Produce a
delete record for the row. |
int |
delete(Object[] row,
Instant ts,
int rowNumber,
int numberOfRows)
Produce a
delete record for the row. |
int |
read(Object[] row,
Instant ts)
Produce a
read record for the row. |
int |
read(Object[] row,
Instant ts,
int rowNumber,
int numberOfRows)
Produce a
read record for the row. |
int |
update(Object[] before,
Object[] after,
Instant ts)
Produce an
update record for the row. |
int |
update(Object[] before,
Object[] after,
Instant ts,
int rowNumber,
int numberOfRows)
Produce an
update record for the row. |
private final BitSet includedColumns
private final RecordMakers.Converter converter
private final BlockingConsumer<org.apache.kafka.connect.source.SourceRecord> consumer
protected RecordsForTable(RecordMakers.Converter converter, BitSet includedColumns, BlockingConsumer<org.apache.kafka.connect.source.SourceRecord> consumer)
public int read(Object[] row, Instant ts) throws InterruptedException
read record for the row.row - the values of the row, in the same order as the columns in the Table definition in the
MySqlSchema.ts - the timestamp for this rowInterruptedException - if this thread is interrupted while waiting to give a source record to the consumerpublic int read(Object[] row, Instant ts, int rowNumber, int numberOfRows) throws InterruptedException
read record for the row.row - the values of the row, in the same order as the columns in the Table definition in the
MySqlSchema.ts - the timestamp for this rowrowNumber - the number of this row; must be 0 or morenumberOfRows - the total number of rows to be read; must be 1 or moreInterruptedException - if this thread is interrupted while waiting to give a source record to the consumerpublic int create(Object[] row, Instant ts) throws InterruptedException
create record for the row.row - the values of the row, in the same order as the columns in the Table definition in the
MySqlSchema.ts - the timestamp for this rowInterruptedException - if this thread is interrupted while waiting to give a source record to the consumerpublic int create(Object[] row, Instant ts, int rowNumber, int numberOfRows) throws InterruptedException
create record for the row.row - the values of the row, in the same order as the columns in the Table definition in the
MySqlSchema.ts - the timestamp for this rowrowNumber - the number of this row; must be 0 or morenumberOfRows - the total number of rows to be read; must be 1 or moreInterruptedException - if this thread is interrupted while waiting to give a source record to the consumerpublic int update(Object[] before, Object[] after, Instant ts) throws InterruptedException
update record for the row.before - the values of the row before the update, in the same order as the columns in the Table
definition in the MySqlSchemaafter - the values of the row after the update, in the same order as the columns in the Table
definition in the MySqlSchemats - the timestamp for this rowInterruptedException - if this thread is interrupted while waiting to give a source record to the consumerpublic int update(Object[] before, Object[] after, Instant ts, int rowNumber, int numberOfRows) throws InterruptedException
update record for the row.before - the values of the row before the update, in the same order as the columns in the Table
definition in the MySqlSchemaafter - the values of the row after the update, in the same order as the columns in the Table
definition in the MySqlSchemats - the timestamp for this rowrowNumber - the number of this row; must be 0 or morenumberOfRows - the total number of rows to be read; must be 1 or moreInterruptedException - if this thread is interrupted while waiting to give a source record to the consumerpublic int delete(Object[] row, Instant ts) throws InterruptedException
delete record for the row.row - the values of the row, in the same order as the columns in the Table definition in the
MySqlSchema.ts - the timestamp for this rowInterruptedException - if this thread is interrupted while waiting to give a source record to the consumerpublic int delete(Object[] row, Instant ts, int rowNumber, int numberOfRows) throws InterruptedException
delete record for the row.row - the values of the row, in the same order as the columns in the Table definition in the
MySqlSchema.ts - the timestamp for this rowrowNumber - the number of this row; must be 0 or morenumberOfRows - the total number of rows to be read; must be 1 or moreInterruptedException - if this thread is interrupted while waiting to give a source record to the consumerCopyright © 2021 JBoss by Red Hat. All rights reserved.