Package io.debezium.pipeline.source.spi
Interface SnapshotChangeEventSource<P extends Partition,O extends OffsetContext>
- All Superinterfaces:
ChangeEventSource
- All Known Implementing Classes:
AbstractSnapshotChangeEventSource
,RelationalSnapshotChangeEventSource
public interface SnapshotChangeEventSource<P extends Partition,O extends OffsetContext>
extends ChangeEventSource
A change event source that emits events for taking a consistent snapshot of the captured tables, which may include
schema and data information.
- Author:
- Gunnar Morling
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.debezium.pipeline.source.spi.ChangeEventSource
ChangeEventSource.ChangeEventSourceContext
-
Method Summary
Modifier and TypeMethodDescriptionexecute
(ChangeEventSource.ChangeEventSourceContext context, P partition, O previousOffset, SnapshottingTask snapshottingTask) Executes this source.default SnapshottingTask
getBlockingSnapshottingTask
(P partition, O previousOffset, SnapshotConfiguration snapshotConfiguration) Returns the blocking snapshotting task based on the snapshot configuration from the signal.getSnapshottingTask
(P partition, O previousOffset) Returns the snapshotting task based on the previous offset (if available) and the connector's snapshotting mode.
-
Method Details
-
execute
SnapshotResult<O> execute(ChangeEventSource.ChangeEventSourceContext context, P partition, O previousOffset, SnapshottingTask snapshottingTask) throws InterruptedException Executes this source. Implementations should regularly check via the given context if they should stop. If that's the case, they should abort their processing and perform any clean-up needed, such as rolling back pending transactions, releasing locks etc.- Parameters:
context
- contextual information for this source's executionpartition
- the source partition from which the snapshot should be takenpreviousOffset
- previous offset restored from KafkasnapshottingTask
-- Returns:
- an indicator to the position at which the snapshot was taken
- Throws:
InterruptedException
- in case the snapshot was aborted before completion
-
getSnapshottingTask
Returns the snapshotting task based on the previous offset (if available) and the connector's snapshotting mode. -
getBlockingSnapshottingTask
default SnapshottingTask getBlockingSnapshottingTask(P partition, O previousOffset, SnapshotConfiguration snapshotConfiguration) Returns the blocking snapshotting task based on the snapshot configuration from the signal.
-