Package io.debezium.connector.informix
Class InformixStreamingChangeEventSource
java.lang.Object
io.debezium.connector.informix.InformixStreamingChangeEventSource
- All Implemented Interfaces:
io.debezium.pipeline.source.spi.ChangeEventSource,io.debezium.pipeline.source.spi.StreamingChangeEventSource<InformixPartition,InformixOffsetContext>
public class InformixStreamingChangeEventSource
extends Object
implements io.debezium.pipeline.source.spi.StreamingChangeEventSource<InformixPartition,InformixOffsetContext>
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.debezium.pipeline.source.spi.ChangeEventSource
io.debezium.pipeline.source.spi.ChangeEventSource.ChangeEventSourceContext -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final io.debezium.util.Clockprivate final InformixConnectorConfigprivate final InformixConnectionprivate final io.debezium.pipeline.EventDispatcher<InformixPartition,io.debezium.relational.TableId> private InformixOffsetContextprivate final io.debezium.pipeline.ErrorHandlerprivate static final org.slf4j.Loggerprivate final InformixConnectionprivate static final Stringprivate static final Stringprivate final InformixDatabaseSchema -
Constructor Summary
ConstructorsConstructorDescriptionInformixStreamingChangeEventSource(InformixConnectorConfig connectorConfig, InformixConnection dataConnection, InformixConnection metadataConnection, io.debezium.pipeline.EventDispatcher<InformixPartition, io.debezium.relational.TableId> dispatcher, io.debezium.pipeline.ErrorHandler errorHandler, io.debezium.util.Clock clock, InformixDatabaseSchema schema) -
Method Summary
Modifier and TypeMethodDescriptionvoidcommitOffset(Map<String, ?> partition, Map<String, ?> offset) voidexecute(io.debezium.pipeline.source.spi.ChangeEventSource.ChangeEventSourceContext context, InformixPartition partition, InformixOffsetContext offsetContext) Executes this source.private com.informix.stream.cdc.IfxCDCEnginegetCDCEngine(InformixDatabaseSchema schema, Lsn startLsn) getTransactionEngine(io.debezium.pipeline.source.spi.ChangeEventSource.ChangeEventSourceContext context, InformixDatabaseSchema schema, Lsn startLsn) private voidhandleMetadata(InformixPartition partition, InformixOffsetContext offsetContext, InformixCdcTransactionEngine engine, com.informix.stream.cdc.records.IfxCDCMetaDataRecord metaDataRecord) private voidhandleOperation(InformixPartition partition, InformixOffsetContext offsetContext, io.debezium.data.Envelope.Operation operation, Map<String, com.informix.jdbc.IfmxReadableType> before, Map<String, com.informix.jdbc.IfmxReadableType> after, io.debezium.relational.TableId tableId) private voidhandleTransaction(InformixCdcTransactionEngine engine, InformixPartition partition, InformixOffsetContext offsetContext, InformixStreamTransactionRecord transactionRecord, boolean recover) voidinit(InformixOffsetContext offsetContext) private voidupdateChangePosition(InformixOffsetContext offsetContext, Long commitSeq, Long changeSeq, Integer transactionId, Long beginSeq) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.debezium.pipeline.source.spi.StreamingChangeEventSource
executeIteration
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
RECEIVED_GENERIC_RECORD
- See Also:
-
RECEIVED_UNKNOWN_RECORD_TYPE
- See Also:
-
connectorConfig
-
dataConnection
-
metadataConnection
-
dispatcher
private final io.debezium.pipeline.EventDispatcher<InformixPartition,io.debezium.relational.TableId> dispatcher -
errorHandler
private final io.debezium.pipeline.ErrorHandler errorHandler -
clock
private final io.debezium.util.Clock clock -
schema
-
effectiveOffsetContext
-
-
Constructor Details
-
InformixStreamingChangeEventSource
public InformixStreamingChangeEventSource(InformixConnectorConfig connectorConfig, InformixConnection dataConnection, InformixConnection metadataConnection, io.debezium.pipeline.EventDispatcher<InformixPartition, io.debezium.relational.TableId> dispatcher, io.debezium.pipeline.ErrorHandler errorHandler, io.debezium.util.Clock clock, InformixDatabaseSchema schema)
-
-
Method Details
-
init
- Specified by:
initin interfaceio.debezium.pipeline.source.spi.StreamingChangeEventSource<InformixPartition,InformixOffsetContext>
-
execute
public void execute(io.debezium.pipeline.source.spi.ChangeEventSource.ChangeEventSourceContext context, InformixPartition partition, InformixOffsetContext offsetContext) throws InterruptedException Executes this source. Implementations should regularly check via the given context if they should stop. If that's the case, they should abort their processing and perform any clean-up needed, such as rolling back pending transactions, releasing locks etc.- Specified by:
executein interfaceio.debezium.pipeline.source.spi.StreamingChangeEventSource<InformixPartition,InformixOffsetContext> - Parameters:
context- contextual information for this source's execution- Throws:
InterruptedException- in case the snapshot was aborted before completion
-
commitOffset
- Specified by:
commitOffsetin interfaceio.debezium.pipeline.source.spi.StreamingChangeEventSource<InformixPartition,InformixOffsetContext>
-
getOffsetContext
- Specified by:
getOffsetContextin interfaceio.debezium.pipeline.source.spi.StreamingChangeEventSource<InformixPartition,InformixOffsetContext>
-
getTransactionEngine
public InformixCdcTransactionEngine getTransactionEngine(io.debezium.pipeline.source.spi.ChangeEventSource.ChangeEventSourceContext context, InformixDatabaseSchema schema, Lsn startLsn) throws SQLException - Throws:
SQLException
-
getCDCEngine
private com.informix.stream.cdc.IfxCDCEngine getCDCEngine(InformixDatabaseSchema schema, Lsn startLsn) throws SQLException - Throws:
SQLException
-
handleTransaction
private void handleTransaction(InformixCdcTransactionEngine engine, InformixPartition partition, InformixOffsetContext offsetContext, InformixStreamTransactionRecord transactionRecord, boolean recover) throws InterruptedException, com.informix.stream.impl.IfxStreamException - Throws:
InterruptedExceptioncom.informix.stream.impl.IfxStreamException
-
handleMetadata
private void handleMetadata(InformixPartition partition, InformixOffsetContext offsetContext, InformixCdcTransactionEngine engine, com.informix.stream.cdc.records.IfxCDCMetaDataRecord metaDataRecord) throws InterruptedException - Throws:
InterruptedException
-
updateChangePosition
private void updateChangePosition(InformixOffsetContext offsetContext, Long commitSeq, Long changeSeq, Integer transactionId, Long beginSeq) -
handleOperation
private void handleOperation(InformixPartition partition, InformixOffsetContext offsetContext, io.debezium.data.Envelope.Operation operation, Map<String, com.informix.jdbc.IfmxReadableType> before, Map<String, throws InterruptedExceptioncom.informix.jdbc.IfmxReadableType> after, io.debezium.relational.TableId tableId) - Throws:
InterruptedException
-