Class MssqlCdcSource
java.lang.Object
org.gridgain.internal.cdc.source.mssql.MssqlCdcSource
- All Implemented Interfaces:
AutoCloseable,org.gridgain.internal.cdc.api.source.CdcSource
public class MssqlCdcSource
extends Object
implements org.gridgain.internal.cdc.api.source.CdcSource
Experimental
CdcSource that reads change events from Microsoft SQL Server's native Change Data Capture.
For each replicated table it polls the table's capture instance (cdc.fn_cdc_get_all_changes_<instance>)
over advancing LSN windows, maps each change row to a TableRowEvent, and pushes batches stamped with the
upper-bound LSN as the resume watermark. In CdcReplicationMode.ALL mode an initial snapshot of existing rows
(emitted as TableRowEventType.CREATED) precedes incremental polling.
Experimental limitations: the type mapping covers common SQL Server types only; the ALL-mode
snapshot is not transactionally consistent with the start LSN for concurrently-modified rows; capture-instance names
default to <schema>_<table> with no per-table override yet.
-
Constructor Summary
ConstructorsConstructorDescriptionMssqlCdcSource(org.gridgain.internal.cdc.api.source.SourceDefinition source) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidstart(org.gridgain.internal.cdc.api.source.SourceTableDefinition table, byte @Nullable [] lastWatermark, org.gridgain.internal.cdc.api.replication.CdcReplicationMode mode, Flow.Subscriber<org.gridgain.internal.cdc.api.source.WatermarkedBatch> subscriber)
-
Constructor Details
-
MssqlCdcSource
public MssqlCdcSource(org.gridgain.internal.cdc.api.source.SourceDefinition source) Constructor.- Parameters:
source- Source definition whose parameters describe the SQL Server connection.
-
-
Method Details
-
start
public void start(org.gridgain.internal.cdc.api.source.SourceTableDefinition table, byte @Nullable [] lastWatermark, org.gridgain.internal.cdc.api.replication.CdcReplicationMode mode, Flow.Subscriber<org.gridgain.internal.cdc.api.source.WatermarkedBatch> subscriber) - Specified by:
startin interfaceorg.gridgain.internal.cdc.api.source.CdcSource
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-