Class RacCommitLogWriterFlushStrategy
java.lang.Object
io.debezium.connector.oracle.logminer.logwriter.RacCommitLogWriterFlushStrategy
- All Implemented Interfaces:
LogWriterFlushStrategy,AutoCloseable
A
LogWriterFlushStrategy for Oracle RAC that performs a transaction-scoped commit
to flush the Oracle LogWriter (LGWR) process on each RAC node.
This strategy builds atop of CommitLogWriterFlushStrategy by creating a commit strategy
to each Oracle RAC node and orchestrating the flushes simultaneously for each node when a flush
is needed. In the event that a node fails to flush, this strategy will delay for 3 seconds to
allow Oracle to automatically flush the buffers before proceeding.- Author:
- Chris Cranford
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final OracleConnectorConfigprivate final Map<String,CommitLogWriterFlushStrategy> private final JdbcConfigurationprivate static final org.slf4j.Loggerprivate final LogMinerStreamingChangeEventSourceMetrics -
Constructor Summary
ConstructorsConstructorDescriptionRacCommitLogWriterFlushStrategy(OracleConnectorConfig connectorConfig, JdbcConfiguration jdbcConfig, LogMinerStreamingChangeEventSourceMetrics streamingMetrics) Creates an Oracle RAC LogWriter (LGWR) flushing strategy. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()private voidCloses the RAC node flush strategies.private CommitLogWriterFlushStrategycreateHostFlushStrategy(String hostName, Integer port, String sid) voidPerform the Oracle LGWR process flush.getHost()private String[]parseHostName(String hostName) private void
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
flushStrategies
-
streamingMetrics
-
jdbcConfiguration
-
connectorConfig
-
hosts
-
-
Constructor Details
-
RacCommitLogWriterFlushStrategy
public RacCommitLogWriterFlushStrategy(OracleConnectorConfig connectorConfig, JdbcConfiguration jdbcConfig, LogMinerStreamingChangeEventSourceMetrics streamingMetrics) Creates an Oracle RAC LogWriter (LGWR) flushing strategy.- Parameters:
connectorConfig- the connector configuration, must not benulljdbcConfig- the mining session JDBC connection configuration, must not benullstreamingMetrics- the streaming metrics, must not benull
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
getHost
- Specified by:
getHostin interfaceLogWriterFlushStrategy- Returns:
- the host or ip address that will be flushed by the strategy
-
flush
Description copied from interface:LogWriterFlushStrategyPerform the Oracle LGWR process flush.- Specified by:
flushin interfaceLogWriterFlushStrategy- Parameters:
currentScn- the current system change number- Throws:
InterruptedException
-
recreateRacNodeFlushStrategies
private void recreateRacNodeFlushStrategies() -
parseHostName
-
createHostFlushStrategy
private CommitLogWriterFlushStrategy createHostFlushStrategy(String hostName, Integer port, String sid) throws SQLException - Throws:
SQLException
-
closeRacNodeFlushStrategies
private void closeRacNodeFlushStrategies()Closes the RAC node flush strategies.
-