Package io.debezium.connector.mysql
Class MySqlChangeEventSourceFactory
java.lang.Object
io.debezium.connector.mysql.MySqlChangeEventSourceFactory
- All Implemented Interfaces:
ChangeEventSourceFactory<MySqlPartition,MySqlOffsetContext>
public class MySqlChangeEventSourceFactory
extends Object
implements ChangeEventSourceFactory<MySqlPartition,MySqlOffsetContext>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Clockprivate final MySqlConnectorConfigprivate final EventDispatcher<MySqlPartition,TableId> private final ErrorHandlerprivate final ChangeEventQueue<DataChangeEvent>private final MySqlDatabaseSchemaprivate final SnapshotterServiceprivate final MySqlStreamingChangeEventSourceMetricsprivate final MySqlTaskContext -
Constructor Summary
ConstructorsConstructorDescriptionMySqlChangeEventSourceFactory(MySqlConnectorConfig configuration, MainConnectionProvidingConnectionFactory<AbstractConnectorConnection> connectionFactory, ErrorHandler errorHandler, EventDispatcher<MySqlPartition, TableId> dispatcher, Clock clock, MySqlDatabaseSchema schema, MySqlTaskContext taskContext, MySqlStreamingChangeEventSourceMetrics streamingMetrics, ChangeEventQueue<DataChangeEvent> queue, SnapshotterService snapshotterService) -
Method Summary
Modifier and TypeMethodDescriptionOptional<IncrementalSnapshotChangeEventSource<MySqlPartition,? extends io.debezium.spi.schema.DataCollectionId>> getIncrementalSnapshotChangeEventSource(MySqlOffsetContext offsetContext, SnapshotProgressListener<MySqlPartition> snapshotProgressListener, DataChangeEventListener<MySqlPartition> dataChangeEventListener, NotificationService<MySqlPartition, MySqlOffsetContext> notificationService) getSnapshotChangeEventSource(SnapshotProgressListener<MySqlPartition> snapshotProgressListener, NotificationService<MySqlPartition, MySqlOffsetContext> notificationService) private voidmodifyAndFlushLastRecord(Function<org.apache.kafka.connect.source.SourceRecord, org.apache.kafka.connect.source.SourceRecord> modify) private void
-
Field Details
-
configuration
-
connectionFactory
private final MainConnectionProvidingConnectionFactory<AbstractConnectorConnection> connectionFactory -
errorHandler
-
dispatcher
-
clock
-
taskContext
-
streamingMetrics
-
schema
-
queue
-
snapshotterService
-
-
Constructor Details
-
MySqlChangeEventSourceFactory
public MySqlChangeEventSourceFactory(MySqlConnectorConfig configuration, MainConnectionProvidingConnectionFactory<AbstractConnectorConnection> connectionFactory, ErrorHandler errorHandler, EventDispatcher<MySqlPartition, TableId> dispatcher, Clock clock, MySqlDatabaseSchema schema, MySqlTaskContext taskContext, MySqlStreamingChangeEventSourceMetrics streamingMetrics, ChangeEventQueue<DataChangeEvent> queue, SnapshotterService snapshotterService)
-
-
Method Details
-
getSnapshotChangeEventSource
public SnapshotChangeEventSource<MySqlPartition,MySqlOffsetContext> getSnapshotChangeEventSource(SnapshotProgressListener<MySqlPartition> snapshotProgressListener, NotificationService<MySqlPartition, MySqlOffsetContext> notificationService) - Specified by:
getSnapshotChangeEventSourcein interfaceChangeEventSourceFactory<MySqlPartition,MySqlOffsetContext>
-
preSnapshot
private void preSnapshot() -
modifyAndFlushLastRecord
private void modifyAndFlushLastRecord(Function<org.apache.kafka.connect.source.SourceRecord, org.apache.kafka.connect.source.SourceRecord> modify) throws InterruptedException- Throws:
InterruptedException
-
getStreamingChangeEventSource
public StreamingChangeEventSource<MySqlPartition,MySqlOffsetContext> getStreamingChangeEventSource()- Specified by:
getStreamingChangeEventSourcein interfaceChangeEventSourceFactory<MySqlPartition,MySqlOffsetContext>
-
getIncrementalSnapshotChangeEventSource
public Optional<IncrementalSnapshotChangeEventSource<MySqlPartition,? extends io.debezium.spi.schema.DataCollectionId>> getIncrementalSnapshotChangeEventSource(MySqlOffsetContext offsetContext, SnapshotProgressListener<MySqlPartition> snapshotProgressListener, DataChangeEventListener<MySqlPartition> dataChangeEventListener, NotificationService<MySqlPartition, MySqlOffsetContext> notificationService) - Specified by:
getIncrementalSnapshotChangeEventSourcein interfaceChangeEventSourceFactory<MySqlPartition,MySqlOffsetContext>
-