diff --git a/src/main/java/io/debezium/connector/db2/Db2ConnectorTask.java b/src/main/java/io/debezium/connector/db2/Db2ConnectorTask.java index 1466803..0c2f165 100644 --- a/src/main/java/io/debezium/connector/db2/Db2ConnectorTask.java +++ b/src/main/java/io/debezium/connector/db2/Db2ConnectorTask.java @@ -21,8 +21,6 @@ import io.debezium.config.Field; import io.debezium.connector.base.ChangeEventQueue; import io.debezium.connector.common.BaseSourceTask; -import io.debezium.connector.db2.snapshot.Db2SnapshotLockProvider; -import io.debezium.connector.db2.snapshot.Db2SnapshotterServiceProvider; import io.debezium.document.DocumentReader; import io.debezium.jdbc.DefaultMainConnectionProvidingConnectionFactory; import io.debezium.jdbc.MainConnectionProvidingConnectionFactory; @@ -37,7 +35,6 @@ import io.debezium.relational.TableId; import io.debezium.schema.SchemaFactory; import io.debezium.schema.SchemaNameAdjuster; -import io.debezium.service.spi.ServiceRegistry; import io.debezium.snapshot.SnapshotterService; import io.debezium.spi.topic.TopicNamingStrategy; import io.debezium.util.Clock; @@ -230,11 +227,4 @@ private static Configuration applyFetchSizeToJdbcConfig(Configuration config) { return config; } - @Override - protected void registerServiceProviders(ServiceRegistry serviceRegistry) { - - super.registerServiceProviders(serviceRegistry); - serviceRegistry.registerServiceProvider(new Db2SnapshotLockProvider()); - serviceRegistry.registerServiceProvider(new Db2SnapshotterServiceProvider()); - } } diff --git a/src/main/java/io/debezium/connector/db2/snapshot/Db2SnapshotLockProvider.java b/src/main/java/io/debezium/connector/db2/snapshot/Db2SnapshotLockProvider.java deleted file mode 100644 index 5fac906..0000000 --- a/src/main/java/io/debezium/connector/db2/snapshot/Db2SnapshotLockProvider.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright Debezium Authors. - * - * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 - */ -package io.debezium.connector.db2.snapshot; - -import io.debezium.bean.StandardBeanNames; -import io.debezium.bean.spi.BeanRegistry; -import io.debezium.connector.db2.Db2ConnectorConfig; -import io.debezium.service.spi.ServiceProvider; -import io.debezium.snapshot.SnapshotLockProvider; -import io.debezium.snapshot.spi.SnapshotLock; - -/** - * An implementation of the {@link ServiceProvider} contract for the {@link SnapshotLock}. - * - * @author Mario Fiore Vitale - */ -public class Db2SnapshotLockProvider extends SnapshotLockProvider { - - @Override - public String snapshotLockingMode(BeanRegistry beanRegistry) { - - Db2ConnectorConfig sqlServerConnectorConfig = beanRegistry.lookupByName(StandardBeanNames.CONNECTOR_CONFIG, Db2ConnectorConfig.class); - - return sqlServerConnectorConfig.getSnapshotLockingMode().getValue(); - } - -} diff --git a/src/main/java/io/debezium/connector/db2/snapshot/Db2SnapshotterServiceProvider.java b/src/main/java/io/debezium/connector/db2/snapshot/Db2SnapshotterServiceProvider.java deleted file mode 100644 index c597673..0000000 --- a/src/main/java/io/debezium/connector/db2/snapshot/Db2SnapshotterServiceProvider.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright Debezium Authors. - * - * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 - */ -package io.debezium.connector.db2.snapshot; - -import io.debezium.bean.StandardBeanNames; -import io.debezium.bean.spi.BeanRegistry; -import io.debezium.connector.db2.Db2ConnectorConfig; -import io.debezium.snapshot.SnapshotterServiceProvider; - -public class Db2SnapshotterServiceProvider extends SnapshotterServiceProvider { - - @Override - public String snapshotMode(BeanRegistry beanRegistry) { - - Db2ConnectorConfig mySqlConnectorConfig = beanRegistry.lookupByName(StandardBeanNames.CONNECTOR_CONFIG, Db2ConnectorConfig.class); - - return mySqlConnectorConfig.getSnapshotMode().getValue(); - } -}