Package io.debezium.connector.oracle
Interface StreamingAdapter<T extends AbstractOracleStreamingChangeEventSourceMetrics>
- All Known Implementing Classes:
AbstractStreamingAdapter,LogMinerAdapter,OpenLogReplicatorAdapter,XStreamAdapter
public interface StreamingAdapter<T extends AbstractOracleStreamingChangeEventSourceMetrics>
Contract that defines unique behavior for each possible
connection.adapter.- Author:
- Chris Cranford
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumControls whether table names are viewed as case-sensitive or not. -
Method Summary
Modifier and TypeMethodDescriptioncopyOffset(OracleConnectorConfig connectorConfig, OracleOffsetContext offsetContext) Creates a copy of the existing offsets.determineSnapshotOffset(RelationalSnapshotChangeEventSource.RelationalSnapshotContext<OraclePartition, OracleOffsetContext> ctx, OracleConnectorConfig connectorConfig, OracleConnection connection) Returns the offset context based on the snapshot state.getOffsetScn(OracleOffsetContext offsetContext) Returns the Scn stored in the offset.getSource(OracleConnection connection, EventDispatcher<OraclePartition, TableId> dispatcher, ErrorHandler errorHandler, Clock clock, OracleDatabaseSchema schema, OracleTaskContext taskContext, Configuration jdbcConfig, T streamingMetrics, SnapshotterService snapshotterService) getStreamingMetrics(OracleTaskContext taskContext, ChangeEventQueueMetrics changeEventQueueMetrics, EventMetadataProvider metadataProvider, OracleConnectorConfig connectorConfig) getTableNameCaseSensitivity(OracleConnection connection) Returns whether table names are case sensitive.getType()default OracleValueConvertersgetValueConverter(OracleConnectorConfig connectorConfig, OracleConnection connection) Returns the value converter for the streaming adapter.
-
Method Details
-
getType
String getType() -
getHistoryRecordComparator
HistoryRecordComparator getHistoryRecordComparator() -
getOffsetContextLoader
OffsetContext.Loader<OracleOffsetContext> getOffsetContextLoader() -
getSource
StreamingChangeEventSource<OraclePartition,OracleOffsetContext> getSource(OracleConnection connection, EventDispatcher<OraclePartition, TableId> dispatcher, ErrorHandler errorHandler, Clock clock, OracleDatabaseSchema schema, OracleTaskContext taskContext, Configuration jdbcConfig, T streamingMetrics, SnapshotterService snapshotterService) -
getStreamingMetrics
T getStreamingMetrics(OracleTaskContext taskContext, ChangeEventQueueMetrics changeEventQueueMetrics, EventMetadataProvider metadataProvider, OracleConnectorConfig connectorConfig) -
getTableNameCaseSensitivity
default StreamingAdapter.TableNameCaseSensitivity getTableNameCaseSensitivity(OracleConnection connection) Returns whether table names are case sensitive. By default the Oracle driver returns table names that are case sensitive. The table names will be returned in upper-case by default and will only be returned in lower or mixed case when the table is created using double-quotes to preserve case. The adapter aligns with the driver's behavior and enforces that table names are case sensitive by default.- Parameters:
connection- database connection, should never benull- Returns:
- the case sensitivity setting for table names used by the connector's runtime adapter
-
determineSnapshotOffset
OracleOffsetContext determineSnapshotOffset(RelationalSnapshotChangeEventSource.RelationalSnapshotContext<OraclePartition, OracleOffsetContext> ctx, OracleConnectorConfig connectorConfig, OracleConnection connection) throws SQLExceptionReturns 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
-
getValueConverter
default OracleValueConverters getValueConverter(OracleConnectorConfig connectorConfig, OracleConnection connection) Returns the value converter for the streaming adapter.- Parameters:
connectorConfig- the connector configuration, shoudl never benullconnection- the database connection, should never benull- Returns:
- the value converter to be used
-
getOffsetScn
Returns the Scn stored in the offset.- Parameters:
offsetContext- the connector offset context- Returns:
- the
Scnstored in the offset
-
copyOffset
OracleOffsetContext copyOffset(OracleConnectorConfig connectorConfig, OracleOffsetContext offsetContext) Creates a copy of the existing offsets.- Parameters:
connectorConfig- the connector configuration, should never benulloffsetContext- the current offset context, should never benull- Returns:
- a copy of the offset context for this adapter
-