public abstract class AbstractSnapshotChangeEventSource extends Object implements SnapshotChangeEventSource
SnapshotChangeEventSource that all implementations should extend
to inherit common functionality.| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractSnapshotChangeEventSource.SnapshotContext
Mutable context which is populated in the course of snapshotting
|
static class |
AbstractSnapshotChangeEventSource.SnapshottingTask
A configuration describing the task to be performed during snapshotting.
|
ChangeEventSource.ChangeEventSourceContext| Modifier and Type | Field and Description |
|---|---|
private CommonConnectorConfig |
connectorConfig |
private static org.slf4j.Logger |
LOGGER |
protected OffsetContext |
previousOffset |
private SnapshotProgressListener |
snapshotProgressListener |
| Constructor and Description |
|---|
AbstractSnapshotChangeEventSource(CommonConnectorConfig connectorConfig,
OffsetContext previousOffset,
SnapshotProgressListener snapshotProgressListener) |
private static final org.slf4j.Logger LOGGER
private final CommonConnectorConfig connectorConfig
protected final OffsetContext previousOffset
private final SnapshotProgressListener snapshotProgressListener
public AbstractSnapshotChangeEventSource(CommonConnectorConfig connectorConfig, OffsetContext previousOffset, SnapshotProgressListener snapshotProgressListener)
public SnapshotResult execute(ChangeEventSource.ChangeEventSourceContext context) throws InterruptedException
SnapshotChangeEventSourceexecute in interface SnapshotChangeEventSourcecontext - contextual information for this source's executionInterruptedException - in case the snapshot was aborted before completionprotected <T extends DataCollectionId> Stream<T> determineDataCollectionsToBeSnapshotted(Collection<T> allDataCollections)
protected void delaySnapshotIfNeeded(ChangeEventSource.ChangeEventSourceContext context) throws InterruptedException
CommonConnectorConfig.SNAPSHOT_DELAY_MS parameter.InterruptedExceptionprotected abstract SnapshotResult doExecute(ChangeEventSource.ChangeEventSourceContext context, AbstractSnapshotChangeEventSource.SnapshotContext snapshotContext, AbstractSnapshotChangeEventSource.SnapshottingTask snapshottingTask) throws Exception
context - contextual information for this source's executionsnapshotContext - mutable context information populated throughout the snapshot processsnapshottingTask - immutable information about what tasks should be performed during snapshotExceptionprotected abstract AbstractSnapshotChangeEventSource.SnapshottingTask getSnapshottingTask(OffsetContext previousOffset)
protected abstract AbstractSnapshotChangeEventSource.SnapshotContext prepare(ChangeEventSource.ChangeEventSourceContext changeEventSourceContext) throws Exception
AbstractSnapshotChangeEventSource.SnapshotContext.Exceptionprotected abstract void complete(AbstractSnapshotChangeEventSource.SnapshotContext snapshotContext)
snapshotContext - snapshot contextCopyright © 2021 JBoss by Red Hat. All rights reserved.