From 05746504ef8d5f0c2852aabac309d5df4f63162b Mon Sep 17 00:00:00 2001 From: "tobias.pobocik" Date: Tue, 14 May 2024 12:20:26 +0200 Subject: [PATCH] Remove redundant ExecutorService This service is no longer required as a part of this rework: https://github.com/opendaylight/controller/commit/9917911b1a492b5f9fbeef1591569f7fc4a80f68 JIRA: LIGHTY-298 Signed-off-by: tobias.pobocik --- .../rcgnmi/module/RcGnmiAppModule.java | 2 +- .../rnc/module/RncLightyModule.java | 1 - .../guice/LightyControllerModule.java | 6 ----- .../controller/guice/tests/GuiceDITest.java | 10 ------- .../controller/guice/tests/TestService.java | 16 ------------ .../spring/LightyCoreSpringConfiguration.java | 13 ---------- .../LightyCoreSpringConfigurationTest.java | 11 -------- .../core/controller/api/LightyServices.java | 6 ----- .../controller/impl/LightyControllerImpl.java | 26 ------------------- .../impl/tests/LightyControllerTest.java | 2 -- .../examples/controllers/bgpapp/Main.java | 1 - .../examples/community/aaa/restconf/Main.java | 1 - .../examples/controllers/actions/Main.java | 1 - .../controllers/restconfapp/Main.java | 1 - .../netconf/tests/LightyTestUtils.java | 1 - .../community/impl/CommunityRestConf.java | 9 +++---- .../impl/CommunityRestConfBuilder.java | 8 +----- 17 files changed, 5 insertions(+), 110 deletions(-) diff --git a/lighty-applications/lighty-rcgnmi-app-aggregator/lighty-rcgnmi-app-module/src/main/java/io/lighty/applications/rcgnmi/module/RcGnmiAppModule.java b/lighty-applications/lighty-rcgnmi-app-aggregator/lighty-rcgnmi-app-module/src/main/java/io/lighty/applications/rcgnmi/module/RcGnmiAppModule.java index e7fa9171b8..ec98a7bb8d 100644 --- a/lighty-applications/lighty-rcgnmi-app-aggregator/lighty-rcgnmi-app-module/src/main/java/io/lighty/applications/rcgnmi/module/RcGnmiAppModule.java +++ b/lighty-applications/lighty-rcgnmi-app-aggregator/lighty-rcgnmi-app-module/src/main/java/io/lighty/applications/rcgnmi/module/RcGnmiAppModule.java @@ -110,7 +110,7 @@ private LightyController initController(final ControllerConfiguration config) th private CommunityRestConf initRestconf(final RestConfConfiguration config, final LightyServices services) { final RestConfConfiguration conf = RestConfConfigUtils.getRestConfConfiguration(config, services); - return CommunityRestConfBuilder.from(conf).withScheduledThreadPool(services.getScheduledThreadPool()).build(); + return CommunityRestConfBuilder.from(conf).build(); } private GnmiSouthboundModule initGnmiModule(final LightyServices services, diff --git a/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-module/src/main/java/io/lighty/applications/rnc/module/RncLightyModule.java b/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-module/src/main/java/io/lighty/applications/rnc/module/RncLightyModule.java index dfba218522..f3b3f1585e 100644 --- a/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-module/src/main/java/io/lighty/applications/rnc/module/RncLightyModule.java +++ b/lighty-applications/lighty-rnc-app-aggregator/lighty-rnc-module/src/main/java/io/lighty/applications/rnc/module/RncLightyModule.java @@ -131,7 +131,6 @@ private CommunityRestConf initRestconf(final RestConfConfiguration rcConfig, fin return CommunityRestConfBuilder.from(restConfConfiguration) .withLightyServer(jettyServerBuilder) - .withScheduledThreadPool(services.getScheduledThreadPool()) .build(); } diff --git a/lighty-core/lighty-controller-guice-di/src/main/java/io/lighty/core/controller/guice/LightyControllerModule.java b/lighty-core/lighty-controller-guice-di/src/main/java/io/lighty/core/controller/guice/LightyControllerModule.java index 08178b551c..d6ba6c8601 100644 --- a/lighty-core/lighty-controller-guice-di/src/main/java/io/lighty/core/controller/guice/LightyControllerModule.java +++ b/lighty-core/lighty-controller-guice-di/src/main/java/io/lighty/core/controller/guice/LightyControllerModule.java @@ -14,8 +14,6 @@ import io.netty.channel.EventLoopGroup; import io.netty.util.Timer; import io.netty.util.concurrent.EventExecutor; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.ScheduledExecutorService; import org.opendaylight.controller.cluster.ActorSystemProvider; import org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface; import org.opendaylight.controller.cluster.datastore.admin.ClusterAdminRpcService; @@ -95,10 +93,6 @@ protected void configure() { bind(EventLoopGroup.class) .annotatedWith(Names.named("WorkerGroup")) .toInstance(lightyServices.getWorkerGroup()); - bind(ExecutorService.class) - .toInstance(lightyServices.getThreadPool()); - bind(ScheduledExecutorService.class) - .toInstance(lightyServices.getScheduledThreadPool()); bind(Timer.class) .toInstance(lightyServices.getTimer()); bind(DOMMountPointService.class) diff --git a/lighty-core/lighty-controller-guice-di/src/test/java/io/lighty/core/controller/guice/tests/GuiceDITest.java b/lighty-core/lighty-controller-guice-di/src/test/java/io/lighty/core/controller/guice/tests/GuiceDITest.java index 6b7f9f76ae..03a22310cd 100644 --- a/lighty-core/lighty-controller-guice-di/src/test/java/io/lighty/core/controller/guice/tests/GuiceDITest.java +++ b/lighty-core/lighty-controller-guice-di/src/test/java/io/lighty/core/controller/guice/tests/GuiceDITest.java @@ -142,16 +142,6 @@ public void testDIEventLoopGroupWorker() { assertNotNull(testService.getEventLoopGroupWorker()); } - @Test - public void testDIThreadPool() { - assertNotNull(testService.getThreadPool()); - } - - @Test - public void testDIScheduledThreadPool() { - assertNotNull(testService.getScheduledThreadPool()); - } - @Test public void testDITimer() { assertNotNull(testService.getTimer()); diff --git a/lighty-core/lighty-controller-guice-di/src/test/java/io/lighty/core/controller/guice/tests/TestService.java b/lighty-core/lighty-controller-guice-di/src/test/java/io/lighty/core/controller/guice/tests/TestService.java index b7878387b7..e39d1435d3 100644 --- a/lighty-core/lighty-controller-guice-di/src/test/java/io/lighty/core/controller/guice/tests/TestService.java +++ b/lighty-core/lighty-controller-guice-di/src/test/java/io/lighty/core/controller/guice/tests/TestService.java @@ -14,8 +14,6 @@ import io.netty.util.concurrent.EventExecutor; import jakarta.inject.Inject; import jakarta.inject.Named; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.ScheduledExecutorService; import org.opendaylight.controller.cluster.ActorSystemProvider; import org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface; import org.opendaylight.controller.cluster.datastore.admin.ClusterAdminRpcService; @@ -94,12 +92,6 @@ public class TestService { @Named("WorkerGroup") private EventLoopGroup eventLoopGroupWorker; - @Inject - private ExecutorService threadPool; - - @Inject - private ScheduledExecutorService scheduledThreadPool; - @Inject private Timer timer; @@ -212,14 +204,6 @@ public EventLoopGroup getEventLoopGroupWorker() { return eventLoopGroupWorker; } - public ExecutorService getThreadPool() { - return threadPool; - } - - public ScheduledExecutorService getScheduledThreadPool() { - return scheduledThreadPool; - } - public Timer getTimer() { return timer; } diff --git a/lighty-core/lighty-controller-spring-di/src/main/java/io/lighty/core/controller/spring/LightyCoreSpringConfiguration.java b/lighty-core/lighty-controller-spring-di/src/main/java/io/lighty/core/controller/spring/LightyCoreSpringConfiguration.java index 4070a814c0..0ddc05b72f 100644 --- a/lighty-core/lighty-controller-spring-di/src/main/java/io/lighty/core/controller/spring/LightyCoreSpringConfiguration.java +++ b/lighty-core/lighty-controller-spring-di/src/main/java/io/lighty/core/controller/spring/LightyCoreSpringConfiguration.java @@ -14,8 +14,6 @@ import io.netty.util.concurrent.EventExecutor; import jakarta.annotation.PostConstruct; import jakarta.annotation.PreDestroy; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.ScheduledExecutorService; import org.opendaylight.controller.cluster.ActorSystemProvider; import org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface; import org.opendaylight.controller.cluster.datastore.admin.ClusterAdminRpcService; @@ -265,17 +263,6 @@ public EventLoopGroup workerGroup() { return this.lightyController.getServices().getWorkerGroup(); } - @Bean(destroyMethod = "") - @Primary - public ExecutorService threadPool() { - return this.lightyController.getServices().getThreadPool(); - } - - @Bean(destroyMethod = "") - public ScheduledExecutorService scheduledThreadPool() { - return this.lightyController.getServices().getScheduledThreadPool(); - } - @Bean(destroyMethod = "") public Timer timer() { return this.lightyController.getServices().getTimer(); diff --git a/lighty-core/lighty-controller-spring-di/src/test/java/io/lighty/core/controller/spring/LightyCoreSpringConfigurationTest.java b/lighty-core/lighty-controller-spring-di/src/test/java/io/lighty/core/controller/spring/LightyCoreSpringConfigurationTest.java index f8110dd389..155629dc16 100644 --- a/lighty-core/lighty-controller-spring-di/src/test/java/io/lighty/core/controller/spring/LightyCoreSpringConfigurationTest.java +++ b/lighty-core/lighty-controller-spring-di/src/test/java/io/lighty/core/controller/spring/LightyCoreSpringConfigurationTest.java @@ -21,8 +21,6 @@ import io.netty.util.concurrent.EventExecutor; import java.util.Collections; import java.util.concurrent.ExecutionException; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.ScheduledExecutorService; import org.junit.jupiter.api.Test; import org.opendaylight.controller.cluster.ActorSystemProvider; import org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface; @@ -157,13 +155,6 @@ public class LightyCoreSpringConfigurationTest extends AbstractJUnit4SpringConte @Qualifier("WorkerGroup") EventLoopGroup workerGroupTestProperty; - @Autowired - ExecutorService threadPoolTestProperty; - - @Autowired - @Qualifier("scheduledThreadPool") - ScheduledExecutorService scheduledThreadPoolTestProperty; - @Autowired Timer timerTestProperty; @@ -198,8 +189,6 @@ public void testLightyBeansExists() { assertNotNull(eventExecutorTestProperty); assertNotNull(bossGroupTestProperty); assertNotNull(workerGroupTestProperty); - assertNotNull(threadPoolTestProperty); - assertNotNull(scheduledThreadPoolTestProperty); assertNotNull(timerTestProperty); } diff --git a/lighty-core/lighty-controller/src/main/java/io/lighty/core/controller/api/LightyServices.java b/lighty-core/lighty-controller/src/main/java/io/lighty/core/controller/api/LightyServices.java index c395e01fbb..8f2fd3adc9 100644 --- a/lighty-core/lighty-controller/src/main/java/io/lighty/core/controller/api/LightyServices.java +++ b/lighty-core/lighty-controller/src/main/java/io/lighty/core/controller/api/LightyServices.java @@ -11,8 +11,6 @@ import io.netty.channel.EventLoopGroup; import io.netty.util.Timer; import io.netty.util.concurrent.EventExecutor; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.ScheduledExecutorService; import org.opendaylight.controller.cluster.ActorSystemProvider; import org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface; import org.opendaylight.controller.cluster.datastore.admin.ClusterAdminRpcService; @@ -90,10 +88,6 @@ public interface LightyServices extends LightyModuleRegistryService { EventLoopGroup getWorkerGroup(); - ExecutorService getThreadPool(); - - ScheduledExecutorService getScheduledThreadPool(); - Timer getTimer(); DOMMountPointService getDOMMountPointService(); diff --git a/lighty-core/lighty-controller/src/main/java/io/lighty/core/controller/impl/LightyControllerImpl.java b/lighty-core/lighty-controller/src/main/java/io/lighty/core/controller/impl/LightyControllerImpl.java index 3647474fdb..d3ad3ab105 100644 --- a/lighty-core/lighty-controller/src/main/java/io/lighty/core/controller/impl/LightyControllerImpl.java +++ b/lighty-core/lighty-controller/src/main/java/io/lighty/core/controller/impl/LightyControllerImpl.java @@ -30,7 +30,6 @@ import io.netty.util.HashedWheelTimer; import io.netty.util.Timer; import io.netty.util.concurrent.DefaultEventExecutor; -import io.netty.util.concurrent.DefaultThreadFactory; import io.netty.util.concurrent.EventExecutor; import java.io.IOException; import java.io.InputStream; @@ -44,9 +43,6 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import org.eclipse.jdt.annotation.Nullable; @@ -174,8 +170,6 @@ public class LightyControllerImpl extends AbstractLightyModule implements Lighty private EventExecutor eventExecutor; private EventLoopGroup bossGroup; private EventLoopGroup workerGroup; - private ExecutorService threadPool; - private ScheduledExecutorService scheduledThreadPool; private Timer timer; private ModuleInfoSnapshot moduleInfoSnapshot; private ModuleInfoSnapshotResolver snapshotResolver; @@ -351,10 +345,6 @@ protected boolean initProcedure() { this.workerGroup = new NioEventLoopGroup(); this.eventExecutor = new DefaultEventExecutor(); this.timer = new HashedWheelTimer(); - this.threadPool = - Executors.newFixedThreadPool(2, new DefaultThreadFactory("default-pool")); - this.scheduledThreadPool = - new ScheduledThreadPoolExecutor(2, new DefaultThreadFactory("default-scheduled-pool")); this.yangLibraryWriter = new YangLibraryWriterSingleton(clusterSingletonServiceProvider, schemaService, dataBroker, true); yangLibraryWriter.instantiateServiceInstance(); @@ -398,12 +388,6 @@ protected boolean stopProcedure() throws InterruptedException, ExecutionExceptio if (this.timer != null) { this.timer.stop(); } - if (this.threadPool != null) { - this.threadPool.shutdown(); - } - if (this.scheduledThreadPool != null) { - this.scheduledThreadPool.shutdown(); - } if (this.clusterSingletonServiceProvider != null) { this.clusterSingletonServiceProvider.close(); } @@ -583,16 +567,6 @@ public EventLoopGroup getWorkerGroup() { return this.workerGroup; } - @Override - public ExecutorService getThreadPool() { - return this.threadPool; - } - - @Override - public ScheduledExecutorService getScheduledThreadPool() { - return this.scheduledThreadPool; - } - @Override public Timer getTimer() { return this.timer; diff --git a/lighty-core/lighty-controller/src/test/java/io/lighty/core/controller/impl/tests/LightyControllerTest.java b/lighty-core/lighty-controller/src/test/java/io/lighty/core/controller/impl/tests/LightyControllerTest.java index dee774a344..2241320f7d 100644 --- a/lighty-core/lighty-controller/src/test/java/io/lighty/core/controller/impl/tests/LightyControllerTest.java +++ b/lighty-core/lighty-controller/src/test/java/io/lighty/core/controller/impl/tests/LightyControllerTest.java @@ -39,8 +39,6 @@ public void controllerSimpleTest() { Assert.assertNotNull(lightyController.getServices().getEventExecutor()); Assert.assertNotNull(lightyController.getServices().getBossGroup()); Assert.assertNotNull(lightyController.getServices().getWorkerGroup()); - Assert.assertNotNull(lightyController.getServices().getThreadPool()); - Assert.assertNotNull(lightyController.getServices().getScheduledThreadPool()); Assert.assertNotNull(lightyController.getServices().getTimer()); Assert.assertNotNull(lightyController.getServices().getDOMMountPointService()); Assert.assertNotNull(lightyController.getServices().getDOMNotificationPublishService()); diff --git a/lighty-examples/lighty-bgp-community-restconf-app/src/main/java/io/lighty/examples/controllers/bgpapp/Main.java b/lighty-examples/lighty-bgp-community-restconf-app/src/main/java/io/lighty/examples/controllers/bgpapp/Main.java index 171688943d..05fa541cac 100644 --- a/lighty-examples/lighty-bgp-community-restconf-app/src/main/java/io/lighty/examples/controllers/bgpapp/Main.java +++ b/lighty-examples/lighty-bgp-community-restconf-app/src/main/java/io/lighty/examples/controllers/bgpapp/Main.java @@ -111,7 +111,6 @@ public synchronized void start(String[] args) throws InterruptedException, Execu restconf = CommunityRestConfBuilder .from(RestConfConfigUtils.getRestConfConfiguration(restConfConfiguration, controller.getServices())) - .withScheduledThreadPool(controller.getServices().getScheduledThreadPool()) .build(); Preconditions.checkState(startLightyModule(restconf, modulesConfig.getModuleTimeoutSeconds()), "Unable to start restconf module"); diff --git a/lighty-examples/lighty-community-aaa-restconf-app/src/main/java/io/lighty/kit/examples/community/aaa/restconf/Main.java b/lighty-examples/lighty-community-aaa-restconf-app/src/main/java/io/lighty/kit/examples/community/aaa/restconf/Main.java index 9fbfb32755..9d0b4729ec 100644 --- a/lighty-examples/lighty-community-aaa-restconf-app/src/main/java/io/lighty/kit/examples/community/aaa/restconf/Main.java +++ b/lighty-examples/lighty-community-aaa-restconf-app/src/main/java/io/lighty/kit/examples/community/aaa/restconf/Main.java @@ -114,7 +114,6 @@ private void startLighty(final ControllerConfiguration controllerConfiguration, .from(RestConfConfigUtils.getRestConfConfiguration(restconfConfiguration, this.lightyController.getServices())) .withLightyServer(jettyServerBuilder) - .withScheduledThreadPool(this.lightyController.getServices().getScheduledThreadPool()) .build(); final boolean restconfStartOk = this.restconf.start() .get(modulesConfig.getModuleTimeoutSeconds(), TimeUnit.SECONDS); diff --git a/lighty-examples/lighty-community-restconf-actions-app/src/main/java/io/lighty/examples/controllers/actions/Main.java b/lighty-examples/lighty-community-restconf-actions-app/src/main/java/io/lighty/examples/controllers/actions/Main.java index 76fb55352e..3921d57a7e 100644 --- a/lighty-examples/lighty-community-restconf-actions-app/src/main/java/io/lighty/examples/controllers/actions/Main.java +++ b/lighty-examples/lighty-community-restconf-actions-app/src/main/java/io/lighty/examples/controllers/actions/Main.java @@ -156,7 +156,6 @@ private void startLighty(final ControllerConfiguration controllerConfiguration, .from(RestConfConfigUtils.getRestConfConfiguration(restconfConfiguration, this.lightyController.getServices())) .withLightyServer(jettyServerBuilder) - .withScheduledThreadPool(lightyController.getServices().getScheduledThreadPool()) .build(); //3. start openApi and RestConf server diff --git a/lighty-examples/lighty-community-restconf-netconf-app/src/main/java/io/lighty/examples/controllers/restconfapp/Main.java b/lighty-examples/lighty-community-restconf-netconf-app/src/main/java/io/lighty/examples/controllers/restconfapp/Main.java index 8d75f7228d..7a7855cf86 100644 --- a/lighty-examples/lighty-community-restconf-netconf-app/src/main/java/io/lighty/examples/controllers/restconfapp/Main.java +++ b/lighty-examples/lighty-community-restconf-netconf-app/src/main/java/io/lighty/examples/controllers/restconfapp/Main.java @@ -153,7 +153,6 @@ private void startLighty(final ControllerConfiguration controllerConfiguration, .from(RestConfConfigUtils.getRestConfConfiguration(restconfConfiguration, this.lightyController.getServices())) .withLightyServer(jettyServerBuilder) - .withScheduledThreadPool(lightyController.getServices().getScheduledThreadPool()) .build(); //3. start openApi and RestConf server diff --git a/lighty-modules/integration-tests/src/test/java/io/lighty/modules/southbound/netconf/tests/LightyTestUtils.java b/lighty-modules/integration-tests/src/test/java/io/lighty/modules/southbound/netconf/tests/LightyTestUtils.java index 69e0e8b798..d4e1c36282 100644 --- a/lighty-modules/integration-tests/src/test/java/io/lighty/modules/southbound/netconf/tests/LightyTestUtils.java +++ b/lighty-modules/integration-tests/src/test/java/io/lighty/modules/southbound/netconf/tests/LightyTestUtils.java @@ -69,7 +69,6 @@ public static CommunityRestConf startRestconf(RestConfConfiguration restConfConf final CommunityRestConf communityRestConf = CommunityRestConfBuilder .from(RestConfConfigUtils.getRestConfConfiguration(restConfConfiguration, services)) - .withScheduledThreadPool(services.getScheduledThreadPool()) .build(); LOG.info("Starting CommunityRestConf"); diff --git a/lighty-modules/lighty-restconf-nb-community/src/main/java/io/lighty/modules/northbound/restconf/community/impl/CommunityRestConf.java b/lighty-modules/lighty-restconf-nb-community/src/main/java/io/lighty/modules/northbound/restconf/community/impl/CommunityRestConf.java index 8e14a88420..1180b8db46 100644 --- a/lighty-modules/lighty-restconf-nb-community/src/main/java/io/lighty/modules/northbound/restconf/community/impl/CommunityRestConf.java +++ b/lighty-modules/lighty-restconf-nb-community/src/main/java/io/lighty/modules/northbound/restconf/community/impl/CommunityRestConf.java @@ -16,7 +16,6 @@ import java.net.InetAddress; import java.net.InetSocketAddress; import java.util.Set; -import java.util.concurrent.ScheduledExecutorService; import javax.ws.rs.core.Application; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.ContextHandlerCollection; @@ -57,14 +56,13 @@ public class CommunityRestConf extends AbstractLightyModule { private final String restconfServletContextPath; private Server jettyServer; private LightyServerBuilder lightyServerBuilder; - private final ScheduledExecutorService scheduledThreadPool; public CommunityRestConf(final DOMDataBroker domDataBroker, final DOMRpcService domRpcService, final DOMActionService domActionService, final DOMNotificationService domNotificationService, final DOMMountPointService domMountPointService, final DOMSchemaService domSchemaService, final InetAddress inetAddress, final int httpPort, final String restconfServletContextPath, - final LightyServerBuilder serverBuilder, final ScheduledExecutorService threadPool) { + final LightyServerBuilder serverBuilder) { this.domDataBroker = domDataBroker; this.domRpcService = domRpcService; this.domActionService = domActionService; @@ -75,17 +73,16 @@ public CommunityRestConf(final DOMDataBroker domDataBroker, final DOMRpcService this.httpPort = httpPort; this.inetAddress = inetAddress; this.restconfServletContextPath = restconfServletContextPath; - this.scheduledThreadPool = threadPool; } public CommunityRestConf(final DOMDataBroker domDataBroker, final DOMRpcService domRpcService, final DOMActionService domActionService, final DOMNotificationService domNotificationService, final DOMMountPointService domMountPointService, final DOMSchemaService domSchemaService, final InetAddress inetAddress, final int httpPort, - final String restconfServletContextPath, final ScheduledExecutorService threadPool) { + final String restconfServletContextPath) { this(domDataBroker, domRpcService, domActionService, domNotificationService, domMountPointService, domSchemaService, inetAddress, httpPort, - restconfServletContextPath, null, threadPool); + restconfServletContextPath, null); } @Override diff --git a/lighty-modules/lighty-restconf-nb-community/src/main/java/io/lighty/modules/northbound/restconf/community/impl/CommunityRestConfBuilder.java b/lighty-modules/lighty-restconf-nb-community/src/main/java/io/lighty/modules/northbound/restconf/community/impl/CommunityRestConfBuilder.java index 0061728f2d..d8c4e90c64 100644 --- a/lighty-modules/lighty-restconf-nb-community/src/main/java/io/lighty/modules/northbound/restconf/community/impl/CommunityRestConfBuilder.java +++ b/lighty-modules/lighty-restconf-nb-community/src/main/java/io/lighty/modules/northbound/restconf/community/impl/CommunityRestConfBuilder.java @@ -9,7 +9,6 @@ import io.lighty.modules.northbound.restconf.community.impl.config.RestConfConfiguration; import io.lighty.server.LightyServerBuilder; -import java.util.concurrent.ScheduledExecutorService; /** * Builder for {@link CommunityRestConf}. @@ -18,7 +17,6 @@ public final class CommunityRestConfBuilder { private RestConfConfiguration restconfConfiguration = null; private LightyServerBuilder lightyServerBuilder = null; - private ScheduledExecutorService threadPool = null; private CommunityRestConfBuilder(final RestConfConfiguration configuration) { @@ -52,10 +50,6 @@ public CommunityRestConfBuilder withLightyServer(final LightyServerBuilder serve * @param pool input scheduledThreadPool. * @return instance of {@link CommunityRestConfBuilder}. */ - public CommunityRestConfBuilder withScheduledThreadPool(final ScheduledExecutorService pool) { - this.threadPool = pool; - return this; - } /** * Build new {@link CommunityRestConf} instance from {@link CommunityRestConfBuilder}. @@ -68,6 +62,6 @@ public CommunityRestConf build() { this.restconfConfiguration.getDomMountPointService(), this.restconfConfiguration.getDomSchemaService(), this.restconfConfiguration.getInetAddress(), this.restconfConfiguration.getHttpPort(), - this.restconfConfiguration.getRestconfServletContextPath(), this.lightyServerBuilder, this.threadPool); + this.restconfConfiguration.getRestconfServletContextPath(), this.lightyServerBuilder); } }