public class Db2SnapshotChangeEventSource
extends io.debezium.relational.RelationalSnapshotChangeEventSource
| Modifier and Type | Class and Description |
|---|---|
private static class |
Db2SnapshotChangeEventSource.Db2SnapshotContext
Mutable context which is populated in the course of snapshotting.
|
io.debezium.relational.RelationalSnapshotChangeEventSource.RelationalSnapshotContext| Modifier and Type | Field and Description |
|---|---|
private Db2ConnectorConfig |
connectorConfig |
private Db2Connection |
jdbcConnection |
private static org.slf4j.Logger |
LOGGER |
| Constructor and Description |
|---|
Db2SnapshotChangeEventSource(Db2ConnectorConfig connectorConfig,
Db2OffsetContext previousOffset,
Db2Connection jdbcConnection,
Db2DatabaseSchema schema,
io.debezium.pipeline.EventDispatcher<io.debezium.relational.TableId> dispatcher,
io.debezium.util.Clock clock,
io.debezium.pipeline.source.spi.SnapshotProgressListener snapshotProgressListener) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
complete(io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.SnapshotContext snapshotContext) |
protected void |
connectionCreated(io.debezium.relational.RelationalSnapshotChangeEventSource.RelationalSnapshotContext snapshotContext) |
protected void |
determineSnapshotOffset(io.debezium.relational.RelationalSnapshotChangeEventSource.RelationalSnapshotContext ctx) |
protected Set<io.debezium.relational.TableId> |
getAllTableIds(io.debezium.relational.RelationalSnapshotChangeEventSource.RelationalSnapshotContext ctx) |
protected io.debezium.schema.SchemaChangeEvent |
getCreateTableEvent(io.debezium.relational.RelationalSnapshotChangeEventSource.RelationalSnapshotContext snapshotContext,
io.debezium.relational.Table table) |
protected Optional<String> |
getSnapshotSelect(io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.SnapshotContext snapshotContext,
io.debezium.relational.TableId tableId)
Generate a valid db2 query string for the specified table
|
protected io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.SnapshottingTask |
getSnapshottingTask(io.debezium.pipeline.spi.OffsetContext previousOffset) |
protected void |
lockTablesForSchemaSnapshot(io.debezium.pipeline.source.spi.ChangeEventSource.ChangeEventSourceContext sourceContext,
io.debezium.relational.RelationalSnapshotChangeEventSource.RelationalSnapshotContext snapshotContext) |
protected io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.SnapshotContext |
prepare(io.debezium.pipeline.source.spi.ChangeEventSource.ChangeEventSourceContext context) |
protected void |
readTableStructure(io.debezium.pipeline.source.spi.ChangeEventSource.ChangeEventSourceContext sourceContext,
io.debezium.relational.RelationalSnapshotChangeEventSource.RelationalSnapshotContext snapshotContext) |
protected void |
releaseSchemaSnapshotLocks(io.debezium.relational.RelationalSnapshotChangeEventSource.RelationalSnapshotContext snapshotContext) |
doExecute, getChangeRecordEmitter, getClock, getColumnValueprivate static final org.slf4j.Logger LOGGER
private final Db2ConnectorConfig connectorConfig
private final Db2Connection jdbcConnection
public Db2SnapshotChangeEventSource(Db2ConnectorConfig connectorConfig, Db2OffsetContext previousOffset, Db2Connection jdbcConnection, Db2DatabaseSchema schema, io.debezium.pipeline.EventDispatcher<io.debezium.relational.TableId> dispatcher, io.debezium.util.Clock clock, io.debezium.pipeline.source.spi.SnapshotProgressListener snapshotProgressListener)
protected io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.SnapshottingTask getSnapshottingTask(io.debezium.pipeline.spi.OffsetContext previousOffset)
getSnapshottingTask in class io.debezium.pipeline.source.AbstractSnapshotChangeEventSourceprotected io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.SnapshotContext prepare(io.debezium.pipeline.source.spi.ChangeEventSource.ChangeEventSourceContext context)
throws Exception
prepare in class io.debezium.pipeline.source.AbstractSnapshotChangeEventSourceExceptionprotected void connectionCreated(io.debezium.relational.RelationalSnapshotChangeEventSource.RelationalSnapshotContext snapshotContext)
throws Exception
connectionCreated in class io.debezium.relational.RelationalSnapshotChangeEventSourceExceptionprotected Set<io.debezium.relational.TableId> getAllTableIds(io.debezium.relational.RelationalSnapshotChangeEventSource.RelationalSnapshotContext ctx) throws Exception
getAllTableIds in class io.debezium.relational.RelationalSnapshotChangeEventSourceExceptionprotected void lockTablesForSchemaSnapshot(io.debezium.pipeline.source.spi.ChangeEventSource.ChangeEventSourceContext sourceContext,
io.debezium.relational.RelationalSnapshotChangeEventSource.RelationalSnapshotContext snapshotContext)
throws SQLException,
InterruptedException
lockTablesForSchemaSnapshot in class io.debezium.relational.RelationalSnapshotChangeEventSourceSQLExceptionInterruptedExceptionprotected void releaseSchemaSnapshotLocks(io.debezium.relational.RelationalSnapshotChangeEventSource.RelationalSnapshotContext snapshotContext)
throws SQLException
releaseSchemaSnapshotLocks in class io.debezium.relational.RelationalSnapshotChangeEventSourceSQLExceptionprotected void determineSnapshotOffset(io.debezium.relational.RelationalSnapshotChangeEventSource.RelationalSnapshotContext ctx)
throws Exception
determineSnapshotOffset in class io.debezium.relational.RelationalSnapshotChangeEventSourceExceptionprotected void readTableStructure(io.debezium.pipeline.source.spi.ChangeEventSource.ChangeEventSourceContext sourceContext,
io.debezium.relational.RelationalSnapshotChangeEventSource.RelationalSnapshotContext snapshotContext)
throws SQLException,
InterruptedException
readTableStructure in class io.debezium.relational.RelationalSnapshotChangeEventSourceSQLExceptionInterruptedExceptionprotected io.debezium.schema.SchemaChangeEvent getCreateTableEvent(io.debezium.relational.RelationalSnapshotChangeEventSource.RelationalSnapshotContext snapshotContext,
io.debezium.relational.Table table)
throws SQLException
getCreateTableEvent in class io.debezium.relational.RelationalSnapshotChangeEventSourceSQLExceptionprotected void complete(io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.SnapshotContext snapshotContext)
complete in class io.debezium.relational.RelationalSnapshotChangeEventSourceprotected Optional<String> getSnapshotSelect(io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.SnapshotContext snapshotContext, io.debezium.relational.TableId tableId)
getSnapshotSelect in class io.debezium.relational.RelationalSnapshotChangeEventSourcetableId - the table to generate a query forCopyright © 2020 JBoss by Red Hat. All rights reserved.