Class LogMinerAdapter
java.lang.Object
io.debezium.connector.oracle.AbstractStreamingAdapter
io.debezium.connector.oracle.logminer.LogMinerAdapter
- All Implemented Interfaces:
StreamingAdapter
- Author:
- Chris Cranford
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.debezium.connector.oracle.StreamingAdapter
StreamingAdapter.TableNameCaseSensitivity -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final Durationprivate static final org.slf4j.Loggerstatic final StringFields inherited from class io.debezium.connector.oracle.AbstractStreamingAdapter
connectorConfig -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddLogsToSession(List<LogFile> logs, int from, int to, OracleConnection connection) private OracleOffsetContextdetermineSnapshotOffset(OracleConnectorConfig connectorConfig, OracleConnection connection, Scn currentScn, Map<String, Scn> pendingTransactions) determineSnapshotOffset(RelationalSnapshotChangeEventSource.RelationalSnapshotContext<OraclePartition, OracleOffsetContext> ctx, OracleConnectorConfig connectorConfig, OracleConnection connection) Returns the offset context based on the snapshot state.private ScngetOldestScnAvailableInLogs(OracleConnectorConfig config, OracleConnection connection) getOrderedLogsFromScn(OracleConnectorConfig config, Scn sinceScn, OracleConnection connection) getPendingTransactions(Scn latestTableDdlScn, OracleConnection connection, Map<String, Scn> transactions) getSource(OracleConnection connection, EventDispatcher<OraclePartition, TableId> dispatcher, ErrorHandler errorHandler, Clock clock, OracleDatabaseSchema schema, OracleTaskContext taskContext, Configuration jdbcConfig, OracleStreamingChangeEventSourceMetrics streamingMetrics) getTransactionIdForScn(Scn scn, OracleConnection connection) private ScngetTransactionStartScn(String transactionId, Scn currentScn, OracleConnection connection) getType()private voidstartSession(OracleConnection connection) private voidstopSession(OracleConnection connection) Methods inherited from class io.debezium.connector.oracle.AbstractStreamingAdapter
areSameTimestamp, getLatestTableDdlScn, resolveScnMethods 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
getTableNameCaseSensitivity
-
Field Details
-
GET_TRANSACTION_SCN_PAUSE
-
GET_TRANSACTION_SCN_ATTEMPTS
private static final int GET_TRANSACTION_SCN_ATTEMPTS- See Also:
-
LOGGER
private static final org.slf4j.Logger LOGGER -
TYPE
- See Also:
-
-
Constructor Details
-
LogMinerAdapter
-
-
Method Details
-
getType
-
getHistoryRecordComparator
-
getOffsetContextLoader
-
getSource
public StreamingChangeEventSource<OraclePartition,OracleOffsetContext> getSource(OracleConnection connection, EventDispatcher<OraclePartition, TableId> dispatcher, ErrorHandler errorHandler, Clock clock, OracleDatabaseSchema schema, OracleTaskContext taskContext, Configuration jdbcConfig, OracleStreamingChangeEventSourceMetrics streamingMetrics) -
determineSnapshotOffset
public OracleOffsetContext determineSnapshotOffset(RelationalSnapshotChangeEventSource.RelationalSnapshotContext<OraclePartition, OracleOffsetContext> ctx, OracleConnectorConfig connectorConfig, OracleConnection connection) throws SQLExceptionDescription copied from interface:StreamingAdapterReturns the offset context based on the snapshot state.- Parameters:
ctx- the relational snapshot context, should never benullconnectorConfig- the connector configuration, should never benullconnection- the database connection, should never benull- Returns:
- the offset context, never
null - Throws:
SQLException- if a database error occurred
-
getPendingTransactions
private Optional<Scn> getPendingTransactions(Scn latestTableDdlScn, OracleConnection connection, Map<String, Scn> transactions) throws SQLException- Throws:
SQLException
-
determineSnapshotOffset
private OracleOffsetContext determineSnapshotOffset(OracleConnectorConfig connectorConfig, OracleConnection connection, Scn currentScn, Map<String, Scn> pendingTransactions) throws SQLException- Throws:
SQLException
-
addLogsToSession
private void addLogsToSession(List<LogFile> logs, int from, int to, OracleConnection connection) throws SQLException - Throws:
SQLException
-
startSession
- Throws:
SQLException
-
stopSession
- Throws:
SQLException
-
getOldestScnAvailableInLogs
private Scn getOldestScnAvailableInLogs(OracleConnectorConfig config, OracleConnection connection) throws SQLException - Throws:
SQLException
-
getOrderedLogsFromScn
private List<LogFile> getOrderedLogsFromScn(OracleConnectorConfig config, Scn sinceScn, OracleConnection connection) throws SQLException - Throws:
SQLException
-
getTransactionIdForScn
private Optional<String> getTransactionIdForScn(Scn scn, OracleConnection connection) throws SQLException, InterruptedException - Throws:
SQLExceptionInterruptedException
-
getTransactionStartScn
private Scn getTransactionStartScn(String transactionId, Scn currentScn, OracleConnection connection) throws SQLException, InterruptedException - Throws:
SQLExceptionInterruptedException
-