Package io.debezium.connector.oracle
Class AbstractStreamingAdapter<T extends AbstractOracleStreamingChangeEventSourceMetrics>
java.lang.Object
io.debezium.connector.oracle.AbstractStreamingAdapter<T>
- All Implemented Interfaces:
StreamingAdapter<T>
- Direct Known Subclasses:
LogMinerAdapter,OpenLogReplicatorAdapter,XStreamAdapter
public abstract class AbstractStreamingAdapter<T extends AbstractOracleStreamingChangeEventSourceMetrics>
extends Object
implements StreamingAdapter<T>
Abstract implementation of the
StreamingAdapter for which all streaming adapters are derived.- Author:
- Chris Cranford
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.debezium.connector.oracle.StreamingAdapter
StreamingAdapter.TableNameCaseSensitivity -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final OracleConnectorConfigprivate static final org.slf4j.Logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanareSameTimestamp(Scn scn1, Scn scn2, OracleConnection connection) Checks whether the two specified system change numbers have the same timestamp.getLatestTableDdlScn(RelationalSnapshotChangeEventSource.RelationalSnapshotContext<OraclePartition, OracleOffsetContext> ctx, OracleConnection connection) Returns the SCN of the latest DDL change to the captured tables.protected ScnresolveScn(Document document) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.debezium.connector.oracle.StreamingAdapter
determineSnapshotOffset, getHistoryRecordComparator, getOffsetContextLoader, getSource, getStreamingMetrics, getTableNameCaseSensitivity, getType, getValueConverter
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
connectorConfig
-
-
Constructor Details
-
AbstractStreamingAdapter
-
-
Method Details
-
resolveScn
-
areSameTimestamp
protected boolean areSameTimestamp(Scn scn1, Scn scn2, OracleConnection connection) throws SQLException Checks whether the two specified system change numbers have the same timestamp.- Parameters:
scn1- first scn number, may benullscn2- second scn number, may benullconnection- the database connection, must not benull- Returns:
- true if the two system change numbers have the same timestamp; false otherwise
- Throws:
SQLException- if a database error occurred
-
getLatestTableDdlScn
protected Optional<Scn> getLatestTableDdlScn(RelationalSnapshotChangeEventSource.RelationalSnapshotContext<OraclePartition, OracleOffsetContext> ctx, OracleConnection connection) throws SQLExceptionReturns the SCN of the latest DDL change to the captured tables. The result will be empty if there is no table to capture as per the configuration.- Parameters:
ctx- the snapshot contest, must not benullconnection- the database connection, must not benull- Returns:
- the latest table DDL system change number, never
nullbut may be empty. - Throws:
SQLException- if a database error occurred
-