public interface TransactionContext
Modifier and Type | Method and Description |
---|---|
void |
abortTransaction()
Requests a transaction abort after the next batch of records from
SourceTask.poll() . |
void |
abortTransaction(SourceRecord record)
Requests a transaction abort after a source record is processed.
|
void |
commitTransaction()
Request a transaction commit after the next batch of records from
SourceTask.poll()
is processed. |
void |
commitTransaction(SourceRecord record)
Request a transaction commit after a source record is processed.
|
void commitTransaction()
SourceTask.poll()
is processed.void commitTransaction(SourceRecord record)
record
- the record to commit the transaction after; may not be null.void abortTransaction()
SourceTask.poll()
. All of
the records in that transaction will be discarded and will not appear in a committed transaction.
However, offsets for that transaction will still be committed so than the records in that transaction
are not reprocessed. If the data should instead be reprocessed, the task should not invoke this method
and should instead throw an exception.void abortTransaction(SourceRecord record)
record
- the record to abort the transaction after; may not be null.