public class OracleSnapshotChangeEventSource
extends io.debezium.relational.RelationalSnapshotChangeEventSource
StreamingChangeEventSource for Oracle.| Modifier and Type | Class and Description |
|---|---|
private static class |
OracleSnapshotChangeEventSource.OracleSnapshotContext
Mutable context which is populated in the course of snapshotting.
|
io.debezium.relational.RelationalSnapshotChangeEventSource.RelationalSnapshotContext| Modifier and Type | Field and Description |
|---|---|
private OracleConnectorConfig |
connectorConfig |
private OracleConnection |
jdbcConnection |
private static org.slf4j.Logger |
LOGGER |
| Constructor and Description |
|---|
OracleSnapshotChangeEventSource(OracleConnectorConfig connectorConfig,
OracleOffsetContext previousOffset,
OracleConnection jdbcConnection,
OracleDatabaseSchema 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 |
|---|---|
private boolean |
areSameTimestamp(Long scn1,
long scn2)
Whether the two SCNs represent the same timestamp or not (resolution is only 3 seconds).
|
protected void |
complete(io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.SnapshotContext snapshotContext) |
protected void |
determineSnapshotOffset(io.debezium.relational.RelationalSnapshotChangeEventSource.RelationalSnapshotContext ctx) |
protected String |
enhanceOverriddenSelect(io.debezium.relational.RelationalSnapshotChangeEventSource.RelationalSnapshotContext snapshotContext,
String overriddenSelect,
io.debezium.relational.TableId tableId) |
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) |
private long |
getCurrentScn(io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.SnapshotContext ctx) |
private Optional<Long> |
getLatestTableDdlScn(io.debezium.relational.RelationalSnapshotChangeEventSource.RelationalSnapshotContext ctx)
Returns the SCN of the latest DDL change to the captured tables.
|
protected Optional<String> |
getSnapshotSelect(io.debezium.relational.RelationalSnapshotChangeEventSource.RelationalSnapshotContext snapshotContext,
io.debezium.relational.TableId tableId) |
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) |
private static String |
quote(io.debezium.relational.TableId tableId) |
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) |
addRawSchemaChangeEvent, connectionCreated, createSnapshotConnection, doExecute, getChangeRecordEmitter, getClock, getColumnValue, getColumnValue, readTableStatement, rowCountForTable, tryStartingSnapshotprivate static final org.slf4j.Logger LOGGER
private final OracleConnectorConfig connectorConfig
private final OracleConnection jdbcConnection
public OracleSnapshotChangeEventSource(OracleConnectorConfig connectorConfig, OracleOffsetContext previousOffset, OracleConnection jdbcConnection, OracleDatabaseSchema 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 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.RelationalSnapshotChangeEventSourceExceptionprivate long getCurrentScn(io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.SnapshotContext ctx)
throws SQLException
SQLExceptionprivate boolean areSameTimestamp(Long scn1, long scn2) throws SQLException
SQLExceptionprivate Optional<Long> getLatestTableDdlScn(io.debezium.relational.RelationalSnapshotChangeEventSource.RelationalSnapshotContext ctx) throws SQLException
SQLExceptionprotected 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 String enhanceOverriddenSelect(io.debezium.relational.RelationalSnapshotChangeEventSource.RelationalSnapshotContext snapshotContext, String overriddenSelect, io.debezium.relational.TableId tableId)
enhanceOverriddenSelect in class io.debezium.relational.RelationalSnapshotChangeEventSourceprotected 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 Optional<String> getSnapshotSelect(io.debezium.relational.RelationalSnapshotChangeEventSource.RelationalSnapshotContext snapshotContext, io.debezium.relational.TableId tableId)
getSnapshotSelect in class io.debezium.relational.RelationalSnapshotChangeEventSourceprotected void complete(io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.SnapshotContext snapshotContext)
complete in class io.debezium.pipeline.source.AbstractSnapshotChangeEventSourceprivate static String quote(io.debezium.relational.TableId tableId)
Copyright © 2021 JBoss by Red Hat. All rights reserved.