Class XStreamAdapter
java.lang.Object
io.debezium.connector.oracle.AbstractStreamingAdapter<XStreamStreamingChangeEventSourceMetrics>
io.debezium.connector.oracle.xstream.XStreamAdapter
- All Implemented Interfaces:
StreamingAdapter<XStreamStreamingChangeEventSourceMetrics>
public class XStreamAdapter
extends AbstractStreamingAdapter<XStreamStreamingChangeEventSourceMetrics>
The streaming adapter implementation for Oracle XStream.
- Author:
- Chris Cranford
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.debezium.connector.oracle.StreamingAdapter
StreamingAdapter.TableNameCaseSensitivity -
Field Summary
FieldsFields inherited from class io.debezium.connector.oracle.AbstractStreamingAdapter
connectorConfig -
Constructor Summary
Constructors -
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.private static ScngetScn(byte[] startPosition) getSource(OracleConnection connection, EventDispatcher<OraclePartition, TableId> dispatcher, ErrorHandler errorHandler, Clock clock, OracleDatabaseSchema schema, OracleTaskContext taskContext, Configuration jdbcConfig, XStreamStreamingChangeEventSourceMetrics streamingMetrics, SnapshotterService snapshotterService) getStreamingMetrics(OracleTaskContext taskContext, ChangeEventQueueMetrics changeEventQueueMetrics, EventMetadataProvider metadataProvider, OracleConnectorConfig connectorConfig) getTableNameCaseSensitivity(OracleConnection connection) Returns whether table names are case sensitive.getType()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
getValueConverter
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
TYPE
- See Also:
-
-
Constructor Details
-
XStreamAdapter
-
-
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, XStreamStreamingChangeEventSourceMetrics streamingMetrics, SnapshotterService snapshotterService) -
getStreamingMetrics
public XStreamStreamingChangeEventSourceMetrics getStreamingMetrics(OracleTaskContext taskContext, ChangeEventQueueMetrics changeEventQueueMetrics, EventMetadataProvider metadataProvider, OracleConnectorConfig connectorConfig) -
getTableNameCaseSensitivity
public StreamingAdapter.TableNameCaseSensitivity getTableNameCaseSensitivity(OracleConnection connection) Description copied from interface:StreamingAdapterReturns 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
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
-
getOffsetScn
Description copied from interface:StreamingAdapterReturns the Scn stored in the offset.- Parameters:
offsetContext- the connector offset context- Returns:
- the
Scnstored in the offset
-
getScn
-
copyOffset
public OracleOffsetContext copyOffset(OracleConnectorConfig connectorConfig, OracleOffsetContext offsetContext) Description copied from interface:StreamingAdapterCreates 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
-