public class OracleSnapshotChangeEventSource
extends io.debezium.relational.HistorizedRelationalSnapshotChangeEventSource
StreamingChangeEventSource for Oracle.| Modifier and Type | Class and Description |
|---|---|
private static class |
OracleSnapshotChangeEventSource.OracleSnapshotContext
Mutable context which is populated in the course of snapshotting.
|
| Modifier and Type | Field and Description |
|---|---|
private io.debezium.util.Clock |
clock |
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.relational.HistorizedRelationalSnapshotChangeEventSource.SnapshotContext snapshotContext) |
protected void |
determineSnapshotOffset(io.debezium.relational.HistorizedRelationalSnapshotChangeEventSource.SnapshotContext ctx) |
protected Set<io.debezium.relational.TableId> |
getAllTableIds(io.debezium.relational.HistorizedRelationalSnapshotChangeEventSource.SnapshotContext ctx) |
protected io.debezium.pipeline.spi.ChangeRecordEmitter |
getChangeRecordEmitter(io.debezium.relational.HistorizedRelationalSnapshotChangeEventSource.SnapshotContext snapshotContext,
io.debezium.relational.TableId tableId,
Object[] row) |
protected io.debezium.schema.SchemaChangeEvent |
getCreateTableEvent(io.debezium.relational.HistorizedRelationalSnapshotChangeEventSource.SnapshotContext snapshotContext,
io.debezium.relational.Table table) |
private long |
getCurrentScn(io.debezium.relational.HistorizedRelationalSnapshotChangeEventSource.SnapshotContext ctx) |
private Optional<Long> |
getLatestTableDdlScn(io.debezium.relational.HistorizedRelationalSnapshotChangeEventSource.SnapshotContext ctx)
Returns the SCN of the latest DDL change to the captured tables.
|
protected String |
getSnapshotSelect(io.debezium.relational.HistorizedRelationalSnapshotChangeEventSource.SnapshotContext snapshotContext,
io.debezium.relational.TableId tableId) |
protected io.debezium.relational.HistorizedRelationalSnapshotChangeEventSource.SnapshottingTask |
getSnapshottingTask(io.debezium.pipeline.spi.OffsetContext previousOffset) |
protected void |
lockTablesForSchemaSnapshot(io.debezium.pipeline.source.spi.ChangeEventSource.ChangeEventSourceContext sourceContext,
io.debezium.relational.HistorizedRelationalSnapshotChangeEventSource.SnapshotContext snapshotContext) |
protected io.debezium.relational.HistorizedRelationalSnapshotChangeEventSource.SnapshotContext |
prepare(io.debezium.pipeline.source.spi.ChangeEventSource.ChangeEventSourceContext context) |
protected void |
readTableStructure(io.debezium.pipeline.source.spi.ChangeEventSource.ChangeEventSourceContext sourceContext,
io.debezium.relational.HistorizedRelationalSnapshotChangeEventSource.SnapshotContext snapshotContext) |
protected void |
releaseSchemaSnapshotLocks(io.debezium.relational.HistorizedRelationalSnapshotChangeEventSource.SnapshotContext snapshotContext) |
private static final org.slf4j.Logger LOGGER
private final OracleConnectorConfig connectorConfig
private final OracleConnection jdbcConnection
private final io.debezium.util.Clock clock
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.relational.HistorizedRelationalSnapshotChangeEventSource.SnapshottingTask getSnapshottingTask(io.debezium.pipeline.spi.OffsetContext previousOffset)
getSnapshottingTask in class io.debezium.relational.HistorizedRelationalSnapshotChangeEventSourceprotected io.debezium.relational.HistorizedRelationalSnapshotChangeEventSource.SnapshotContext prepare(io.debezium.pipeline.source.spi.ChangeEventSource.ChangeEventSourceContext context)
throws Exception
prepare in class io.debezium.relational.HistorizedRelationalSnapshotChangeEventSourceExceptionprotected Set<io.debezium.relational.TableId> getAllTableIds(io.debezium.relational.HistorizedRelationalSnapshotChangeEventSource.SnapshotContext ctx) throws Exception
getAllTableIds in class io.debezium.relational.HistorizedRelationalSnapshotChangeEventSourceExceptionprotected void lockTablesForSchemaSnapshot(io.debezium.pipeline.source.spi.ChangeEventSource.ChangeEventSourceContext sourceContext,
io.debezium.relational.HistorizedRelationalSnapshotChangeEventSource.SnapshotContext snapshotContext)
throws SQLException,
InterruptedException
lockTablesForSchemaSnapshot in class io.debezium.relational.HistorizedRelationalSnapshotChangeEventSourceSQLExceptionInterruptedExceptionprotected void releaseSchemaSnapshotLocks(io.debezium.relational.HistorizedRelationalSnapshotChangeEventSource.SnapshotContext snapshotContext)
throws SQLException
releaseSchemaSnapshotLocks in class io.debezium.relational.HistorizedRelationalSnapshotChangeEventSourceSQLExceptionprotected void determineSnapshotOffset(io.debezium.relational.HistorizedRelationalSnapshotChangeEventSource.SnapshotContext ctx)
throws Exception
determineSnapshotOffset in class io.debezium.relational.HistorizedRelationalSnapshotChangeEventSourceExceptionprivate long getCurrentScn(io.debezium.relational.HistorizedRelationalSnapshotChangeEventSource.SnapshotContext ctx)
throws SQLException
SQLExceptionprivate boolean areSameTimestamp(Long scn1, long scn2) throws SQLException
SQLExceptionprivate Optional<Long> getLatestTableDdlScn(io.debezium.relational.HistorizedRelationalSnapshotChangeEventSource.SnapshotContext ctx) throws SQLException
SQLExceptionprotected void readTableStructure(io.debezium.pipeline.source.spi.ChangeEventSource.ChangeEventSourceContext sourceContext,
io.debezium.relational.HistorizedRelationalSnapshotChangeEventSource.SnapshotContext snapshotContext)
throws SQLException,
InterruptedException
readTableStructure in class io.debezium.relational.HistorizedRelationalSnapshotChangeEventSourceSQLExceptionInterruptedExceptionprotected io.debezium.schema.SchemaChangeEvent getCreateTableEvent(io.debezium.relational.HistorizedRelationalSnapshotChangeEventSource.SnapshotContext snapshotContext,
io.debezium.relational.Table table)
throws SQLException
getCreateTableEvent in class io.debezium.relational.HistorizedRelationalSnapshotChangeEventSourceSQLExceptionprotected String getSnapshotSelect(io.debezium.relational.HistorizedRelationalSnapshotChangeEventSource.SnapshotContext snapshotContext, io.debezium.relational.TableId tableId)
getSnapshotSelect in class io.debezium.relational.HistorizedRelationalSnapshotChangeEventSourceprotected io.debezium.pipeline.spi.ChangeRecordEmitter getChangeRecordEmitter(io.debezium.relational.HistorizedRelationalSnapshotChangeEventSource.SnapshotContext snapshotContext,
io.debezium.relational.TableId tableId,
Object[] row)
getChangeRecordEmitter in class io.debezium.relational.HistorizedRelationalSnapshotChangeEventSourceprotected void complete(io.debezium.relational.HistorizedRelationalSnapshotChangeEventSource.SnapshotContext snapshotContext)
complete in class io.debezium.relational.HistorizedRelationalSnapshotChangeEventSourceCopyright © 2019 JBoss by Red Hat. All rights reserved.