Remove odl-controller-exp-netty-config 81/109881/1
authorRobert Varga <robert.varga@pantheon.tech>
Sat, 20 Jan 2024 13:14:52 +0000 (14:14 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Sat, 20 Jan 2024 13:19:55 +0000 (14:19 +0100)
Remove all of configuration remnants, as there is just a single
downstream user.

JIRA: CONTROLLER-2092
Change-Id: I2d0bb01cfd061c2f0086fcc80b27e6b0a336e5dc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
28 files changed:
artifacts/pom.xml
docs/pom.xml
features/features-controller-experimental/pom.xml
features/odl-controller-exp-netty-config/pom.xml [deleted file]
features/odl-controller-exp-netty-config/src/main/feature/feature.xml [deleted file]
features/pom.xml
opendaylight/config/netty-event-executor-config/pom.xml [deleted file]
opendaylight/config/netty-event-executor-config/src/main/java/org/opendaylight/controller/config/yang/netty/eventexecutor/AutoCloseableEventExecutor.java [deleted file]
opendaylight/config/netty-event-executor-config/src/main/java/org/opendaylight/controller/config/yang/netty/eventexecutor/OSGiGlobalEventExecutor.java [deleted file]
opendaylight/config/netty-threadgroup-config/pom.xml [deleted file]
opendaylight/config/netty-threadgroup-config/src/main/java/org/opendaylight/controller/config/yang/netty/threadgroup/AbstractGlobalGroup.java [deleted file]
opendaylight/config/netty-threadgroup-config/src/main/java/org/opendaylight/controller/config/yang/netty/threadgroup/Configuration.java [deleted file]
opendaylight/config/netty-threadgroup-config/src/main/java/org/opendaylight/controller/config/yang/netty/threadgroup/GlobalBossGroup.java [deleted file]
opendaylight/config/netty-threadgroup-config/src/main/java/org/opendaylight/controller/config/yang/netty/threadgroup/GlobalWorkerGroup.java [deleted file]
opendaylight/config/netty-threadgroup-config/src/main/java/org/opendaylight/controller/config/yang/netty/threadgroup/package-info.java [deleted file]
opendaylight/config/netty-timer-config/pom.xml [deleted file]
opendaylight/config/netty-timer-config/src/main/java/org/opendaylight/controller/config/yang/netty/timer/HashedWheelTimerCloseable.java [deleted file]
opendaylight/config/netty-timer-config/src/main/java/org/opendaylight/controller/config/yang/netty/timer/OSGiGlobalTimer.java [deleted file]
opendaylight/config/pom.xml [deleted file]
opendaylight/config/threadpool-config-api/pom.xml [deleted file]
opendaylight/config/threadpool-config-api/src/main/java/org/opendaylight/controller/config/threadpool/ScheduledThreadPool.java [deleted file]
opendaylight/config/threadpool-config-api/src/main/java/org/opendaylight/controller/config/threadpool/ThreadPool.java [deleted file]
opendaylight/config/threadpool-config-impl/pom.xml [deleted file]
opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/threadpool/util/FixedThreadPoolWrapper.java [deleted file]
opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/threadpool/util/FlexibleThreadPoolWrapper.java [deleted file]
opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/threadpool/util/NamingThreadPoolFactory.java [deleted file]
opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/threadpool/util/ScheduledThreadPoolWrapper.java [deleted file]
pom.xml

index d992ba7fac74df201b69e5cf897b23c7c2753db4..f5d0bc9ce778618877f666e40b2687c282cada99 100644 (file)
                 <version>${project.version}</version>
             </dependency>
 
+            <!-- Atomix -->
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>atomix-storage</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+
             <!-- Core API/implementation -->
             <dependency>
                 <groupId>${project.groupId}</groupId>
                 <classifier>features</classifier>
                 <type>xml</type>
             </dependency>
-
-            <!-- Config remnants -->
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>netty-event-executor-config</artifactId>
-                <version>0.20.0-SNAPSHOT</version>
-            </dependency>
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>netty-threadgroup-config</artifactId>
-                <version>0.20.0-SNAPSHOT</version>
-            </dependency>
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>netty-timer-config</artifactId>
-                <version>0.20.0-SNAPSHOT</version>
-            </dependency>
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>threadpool-config-api</artifactId>
-                <version>0.20.0-SNAPSHOT</version>
-            </dependency>
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>threadpool-config-impl</artifactId>
-                <version>0.20.0-SNAPSHOT</version>
-            </dependency>
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>odl-controller-exp-netty-config</artifactId>
-                <version>${project.version}</version>
-                <classifier>features</classifier>
-                <type>xml</type>
-            </dependency>
-
-            <!-- Atomix -->
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>atomix-storage</artifactId>
-                <version>${project.version}</version>
-            </dependency>
         </dependencies>
     </dependencyManagement>
 </project>
index 39a80ebb702bd406d3ac329faa45855e1b9ed530..bf9ac759321474e1309946e45a72e713858fd05c 100644 (file)
     </dependencyManagement>
 
     <dependencies>
-        <!-- Config Subsystem remnants -->
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>netty-event-executor-config</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>netty-threadgroup-config</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>netty-timer-config</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>threadpool-config-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>threadpool-config-impl</artifactId>
-        </dependency>
-
         <!-- Clustered implementation -->
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
index ad3ea2a93db35d8f7865917d76e5343b18fa6204..235a92090957ae6e2bf61e7bb11e7de75093b2c2 100644 (file)
     </dependencyManagement>
 
     <dependencies>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>odl-controller-exp-netty-config</artifactId>
-            <type>xml</type>
-            <classifier>features</classifier>
-        </dependency>
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>odl-toaster</artifactId>
diff --git a/features/odl-controller-exp-netty-config/pom.xml b/features/odl-controller-exp-netty-config/pom.xml
deleted file mode 100644 (file)
index 89058d1..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright © 2016, 2017 Red Hat, Inc. and others.
-
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>single-feature-parent</artifactId>
-        <version>9.0.0-SNAPSHOT</version>
-        <relativePath>../single-feature-parent</relativePath>
-    </parent>
-
-    <artifactId>odl-controller-exp-netty-config</artifactId>
-    <packaging>feature</packaging>
-    <name>OpenDaylight :: Controller :: Experimental :: Netty Configuration</name>
-    <description>Common configuration for Netty resources</description>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.opendaylight.odlparent</groupId>
-            <artifactId>odl-netty-4</artifactId>
-            <type>xml</type>
-            <classifier>features</classifier>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>netty-event-executor-config</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>netty-threadgroup-config</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>netty-timer-config</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>threadpool-config-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>threadpool-config-impl</artifactId>
-        </dependency>
-    </dependencies>
-</project>
diff --git a/features/odl-controller-exp-netty-config/src/main/feature/feature.xml b/features/odl-controller-exp-netty-config/src/main/feature/feature.xml
deleted file mode 100644 (file)
index 866b352..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<!--
- Copyright © 2018 Red Hat, Inc. and others.
-
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html
- -->
-<features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="odl-controller-exp-netty-config">
-    <feature name="odl-controller-exp-netty-config">
-        <feature version="[13,14)">odl-netty-4</feature>
-    </feature>
-</features>
index c2aa4f200f951052d51518a64b997888ebc9aa0c..c51c4a2ca65b2e26376651e60803bd7a116f6c74 100644 (file)
@@ -34,7 +34,7 @@
 
     <!-- Experimental features -->
     <module>features-controller-experimental</module>
-    <module>odl-controller-exp-netty-config</module>
+    <module>odl-toaster</module>
 
     <!-- CSIT features -->
     <module>features-controller-testing</module>
 
     <!-- Single features, to be cleaned up -->
     <module>odl-controller-blueprint</module>
+    <module>odl-controller-broker-local</module>
     <module>odl-controller-mdsal-common</module>
     <module>odl-jolokia</module>
-    <module>odl-controller-broker-local</module>
     <module>odl-mdsal-broker</module>
     <module>odl-mdsal-clustering-commons</module>
     <module>odl-mdsal-distributed-datastore</module>
     <module>odl-mdsal-remoterpc-connector</module>
-    <module>odl-toaster</module>
   </modules>
 </project>
diff --git a/opendaylight/config/netty-event-executor-config/pom.xml b/opendaylight/config/netty-event-executor-config/pom.xml
deleted file mode 100644 (file)
index 20e52eb..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.opendaylight.odlparent</groupId>
-    <artifactId>bundle-parent</artifactId>
-    <version>13.0.10</version>
-    <relativePath/>
-  </parent>
-
-  <groupId>org.opendaylight.controller</groupId>
-  <artifactId>netty-event-executor-config</artifactId>
-  <version>0.20.0-SNAPSHOT</version>
-  <packaging>bundle</packaging>
-  <name>${project.artifactId}</name>
-  <description>Configuration Wrapper around netty's event executor</description>
-
-  <dependencies>
-    <dependency>
-      <groupId>com.google.guava</groupId>
-      <artifactId>guava</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>io.netty</groupId>
-      <artifactId>netty-common</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.osgi</groupId>
-      <artifactId>org.osgi.service.component.annotations</artifactId>
-    </dependency>
-  </dependencies>
-</project>
diff --git a/opendaylight/config/netty-event-executor-config/src/main/java/org/opendaylight/controller/config/yang/netty/eventexecutor/AutoCloseableEventExecutor.java b/opendaylight/config/netty-event-executor-config/src/main/java/org/opendaylight/controller/config/yang/netty/eventexecutor/AutoCloseableEventExecutor.java
deleted file mode 100644 (file)
index a7b931b..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.netty.eventexecutor;
-
-import com.google.common.reflect.AbstractInvocationHandler;
-import com.google.common.reflect.Reflection;
-import io.netty.util.concurrent.EventExecutor;
-import io.netty.util.concurrent.GlobalEventExecutor;
-import io.netty.util.concurrent.ImmediateEventExecutor;
-import java.lang.reflect.Method;
-import java.util.concurrent.TimeUnit;
-
-public interface AutoCloseableEventExecutor extends EventExecutor, AutoCloseable {
-    static AutoCloseableEventExecutor globalEventExecutor() {
-        return createCloseableProxy(GlobalEventExecutor.INSTANCE);
-    }
-
-    static AutoCloseableEventExecutor immediateEventExecutor() {
-        return createCloseableProxy(ImmediateEventExecutor.INSTANCE);
-    }
-
-    private static AutoCloseableEventExecutor createCloseableProxy(final EventExecutor eventExecutor) {
-        return Reflection.newProxy(AutoCloseableEventExecutor.class, new AbstractInvocationHandler() {
-            @Override
-            protected Object handleInvocation(final Object proxy, final Method method, final Object[] args)
-                throws Throwable {
-                if (method.getName().equals("close")) {
-                    eventExecutor.shutdownGracefully(0, 1, TimeUnit.SECONDS);
-                    return null;
-                } else {
-                    return method.invoke(eventExecutor, args);
-                }
-            }
-        });
-    }
-}
diff --git a/opendaylight/config/netty-event-executor-config/src/main/java/org/opendaylight/controller/config/yang/netty/eventexecutor/OSGiGlobalEventExecutor.java b/opendaylight/config/netty-event-executor-config/src/main/java/org/opendaylight/controller/config/yang/netty/eventexecutor/OSGiGlobalEventExecutor.java
deleted file mode 100644 (file)
index 58697d8..0000000
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * Copyright (c) 2020 PANTHEON.tech, s.r.o. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.netty.eventexecutor;
-
-import static io.netty.util.concurrent.GlobalEventExecutor.INSTANCE;
-
-import io.netty.util.concurrent.EventExecutor;
-import io.netty.util.concurrent.EventExecutorGroup;
-import io.netty.util.concurrent.Future;
-import io.netty.util.concurrent.ProgressivePromise;
-import io.netty.util.concurrent.Promise;
-import io.netty.util.concurrent.ScheduledFuture;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-import org.osgi.service.component.annotations.Activate;
-import org.osgi.service.component.annotations.Component;
-import org.osgi.service.component.annotations.Deactivate;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@Component(immediate = true, property = "type=global-event-executor")
-public final class OSGiGlobalEventExecutor implements EventExecutor {
-    private static final Logger LOG = LoggerFactory.getLogger(OSGiGlobalEventExecutor.class);
-
-    @Override
-    public boolean isShuttingDown() {
-        return INSTANCE.isShuttingDown();
-    }
-
-    @Override
-    public Future<?> shutdownGracefully() {
-        return INSTANCE.shutdownGracefully();
-    }
-
-    @Override
-    public Future<?> shutdownGracefully(final long quietPeriod, final long timeout, final TimeUnit unit) {
-        return INSTANCE.shutdownGracefully(quietPeriod, timeout, unit);
-    }
-
-    @Override
-    public Future<?> terminationFuture() {
-        return INSTANCE.terminationFuture();
-    }
-
-    @Override
-    @Deprecated
-    public void shutdown() {
-        INSTANCE.shutdown();
-    }
-
-    @Override
-    public List<Runnable> shutdownNow() {
-        return INSTANCE.shutdownNow();
-    }
-
-    @Override
-    public Iterator<EventExecutor> iterator() {
-        return INSTANCE.iterator();
-    }
-
-    @Override
-    public Future<?> submit(final Runnable task) {
-        return INSTANCE.submit(task);
-    }
-
-    @Override
-    public <T> Future<T> submit(final Runnable task, final T result) {
-        return INSTANCE.submit(task, result);
-    }
-
-    @Override
-    public <T> Future<T> submit(final Callable<T> task) {
-        return INSTANCE.submit(task);
-    }
-
-    @Override
-    public ScheduledFuture<?> schedule(final Runnable command, final long delay, final TimeUnit unit) {
-        return INSTANCE.schedule(command, delay, unit);
-    }
-
-    @Override
-    public <V> ScheduledFuture<V> schedule(final Callable<V> callable, final long delay, final TimeUnit unit) {
-        return INSTANCE.schedule(callable, delay, unit);
-    }
-
-    @Override
-    public ScheduledFuture<?> scheduleAtFixedRate(final Runnable command, final long initialDelay, final long period,
-            final TimeUnit unit) {
-        return INSTANCE.scheduleAtFixedRate(command, initialDelay, period, unit);
-    }
-
-    @Override
-    public ScheduledFuture<?> scheduleWithFixedDelay(final Runnable command, final long initialDelay, final long delay,
-            final TimeUnit unit) {
-        return INSTANCE.scheduleWithFixedDelay(command, initialDelay, delay, unit);
-    }
-
-    @Override
-    public boolean isShutdown() {
-        return INSTANCE.isShutdown();
-    }
-
-    @Override
-    public boolean isTerminated() {
-        return INSTANCE.isTerminated();
-    }
-
-    @Override
-    public boolean awaitTermination(final long timeout, final TimeUnit unit) throws InterruptedException {
-        return INSTANCE.awaitTermination(timeout, unit);
-    }
-
-    @Override
-    public <T> List<java.util.concurrent.Future<T>> invokeAll(final Collection<? extends Callable<T>> tasks)
-            throws InterruptedException {
-        return INSTANCE.invokeAll(tasks);
-    }
-
-    @Override
-    public <T> List<java.util.concurrent.Future<T>> invokeAll(final Collection<? extends Callable<T>> tasks,
-            final long timeout, final TimeUnit unit) throws InterruptedException {
-        return INSTANCE.invokeAll(tasks, timeout, unit);
-    }
-
-    @Override
-    public <T> T invokeAny(final Collection<? extends Callable<T>> tasks)
-            throws InterruptedException, ExecutionException {
-        return INSTANCE.invokeAny(tasks);
-    }
-
-    @Override
-    public <T> T invokeAny(final Collection<? extends Callable<T>> tasks, final long timeout, final TimeUnit unit)
-            throws InterruptedException, ExecutionException, TimeoutException {
-        return INSTANCE.invokeAny(tasks, timeout, unit);
-    }
-
-    @Override
-    public void execute(final Runnable command) {
-        INSTANCE.execute(command);
-    }
-
-    @Override
-    public EventExecutor next() {
-        return INSTANCE.next();
-    }
-
-    @Override
-    public EventExecutorGroup parent() {
-        return INSTANCE.parent();
-    }
-
-    @Override
-    public boolean inEventLoop() {
-        return INSTANCE.inEventLoop();
-    }
-
-    @Override
-    public boolean inEventLoop(final Thread thread) {
-        return INSTANCE.inEventLoop(thread);
-    }
-
-    @Override
-    public <V> Promise<V> newPromise() {
-        return INSTANCE.newPromise();
-    }
-
-    @Override
-    public <V> ProgressivePromise<V> newProgressivePromise() {
-        return INSTANCE.newProgressivePromise();
-    }
-
-    @Override
-    public <V> Future<V> newSucceededFuture(final V result) {
-        return INSTANCE.newSucceededFuture(result);
-    }
-
-    @Override
-    public <V> Future<V> newFailedFuture(final Throwable cause) {
-        return INSTANCE.newFailedFuture(cause);
-    }
-
-    @Activate
-    void activate() {
-        LOG.info("Global Event executor enabled");
-    }
-
-    @Deactivate
-    void deactivate() {
-        LOG.info("Global Event executor disabled");
-    }
-
-}
diff --git a/opendaylight/config/netty-threadgroup-config/pom.xml b/opendaylight/config/netty-threadgroup-config/pom.xml
deleted file mode 100644 (file)
index 7c1d9bc..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.opendaylight.odlparent</groupId>
-    <artifactId>bundle-parent</artifactId>
-    <version>13.0.10</version>
-    <relativePath/>
-  </parent>
-
-  <groupId>org.opendaylight.controller</groupId>
-  <artifactId>netty-threadgroup-config</artifactId>
-  <version>0.20.0-SNAPSHOT</version>
-  <packaging>bundle</packaging>
-  <name>${project.artifactId}</name>
-  <description>Configuration Wrapper around netty's event group</description>
-
-  <dependencies>
-    <dependency>
-      <groupId>io.netty</groupId>
-      <artifactId>netty-common</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>io.netty</groupId>
-      <artifactId>netty-transport</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.osgi</groupId>
-      <artifactId>org.osgi.service.component.annotations</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.osgi</groupId>
-      <artifactId>org.osgi.service.metatype.annotations</artifactId>
-    </dependency>
-  </dependencies>
-</project>
diff --git a/opendaylight/config/netty-threadgroup-config/src/main/java/org/opendaylight/controller/config/yang/netty/threadgroup/AbstractGlobalGroup.java b/opendaylight/config/netty-threadgroup-config/src/main/java/org/opendaylight/controller/config/yang/netty/threadgroup/AbstractGlobalGroup.java
deleted file mode 100644 (file)
index ca4bc29..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.netty.threadgroup;
-
-import io.netty.channel.nio.NioEventLoopGroup;
-import java.util.concurrent.TimeUnit;
-
-abstract class AbstractGlobalGroup extends NioEventLoopGroup implements AutoCloseable {
-    AbstractGlobalGroup(final int threadCount) {
-        super(threadCount < 0 ? 0 : threadCount);
-    }
-
-    @Override
-    public final void close() {
-        shutdownGracefully(0, 1, TimeUnit.SECONDS);
-    }
-}
diff --git a/opendaylight/config/netty-threadgroup-config/src/main/java/org/opendaylight/controller/config/yang/netty/threadgroup/Configuration.java b/opendaylight/config/netty-threadgroup-config/src/main/java/org/opendaylight/controller/config/yang/netty/threadgroup/Configuration.java
deleted file mode 100644 (file)
index 174b44f..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.netty.threadgroup;
-
-import org.osgi.service.metatype.annotations.AttributeDefinition;
-import org.osgi.service.metatype.annotations.ObjectClassDefinition;
-
-@ObjectClassDefinition(pid = "org.opendaylight.netty.threadgroup")
-public @interface Configuration {
-    @AttributeDefinition(name = "global-boss-group-thread-count")
-    int bossThreadCount() default 0;
-
-    @AttributeDefinition(name = "global-worker-group-thread-count")
-    int workerThreadCount() default 0;
-}
diff --git a/opendaylight/config/netty-threadgroup-config/src/main/java/org/opendaylight/controller/config/yang/netty/threadgroup/GlobalBossGroup.java b/opendaylight/config/netty-threadgroup-config/src/main/java/org/opendaylight/controller/config/yang/netty/threadgroup/GlobalBossGroup.java
deleted file mode 100644 (file)
index 5b46184..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.netty.threadgroup;
-
-import io.netty.channel.EventLoopGroup;
-import org.osgi.service.component.annotations.Activate;
-import org.osgi.service.component.annotations.Component;
-import org.osgi.service.component.annotations.Deactivate;
-import org.osgi.service.metatype.annotations.Designate;
-
-@Component(immediate = true, service = EventLoopGroup.class, property = "type=global-boss-group")
-@Designate(ocd = Configuration.class)
-public final class GlobalBossGroup extends AbstractGlobalGroup {
-    @Activate
-    public GlobalBossGroup(final Configuration configuration) {
-        super(configuration.bossThreadCount());
-    }
-
-    @Deactivate
-    void deactivate() {
-        close();
-    }
-}
diff --git a/opendaylight/config/netty-threadgroup-config/src/main/java/org/opendaylight/controller/config/yang/netty/threadgroup/GlobalWorkerGroup.java b/opendaylight/config/netty-threadgroup-config/src/main/java/org/opendaylight/controller/config/yang/netty/threadgroup/GlobalWorkerGroup.java
deleted file mode 100644 (file)
index 4a9f46e..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.netty.threadgroup;
-
-import io.netty.channel.EventLoopGroup;
-import org.osgi.service.component.annotations.Activate;
-import org.osgi.service.component.annotations.Component;
-import org.osgi.service.component.annotations.Deactivate;
-import org.osgi.service.metatype.annotations.Designate;
-
-@Component(immediate = true, service = EventLoopGroup.class, property = "type=global-worker-group")
-@Designate(ocd = Configuration.class)
-public final class GlobalWorkerGroup extends AbstractGlobalGroup {
-    @Activate
-    public GlobalWorkerGroup(final Configuration configuration) {
-        super(configuration.workerThreadCount());
-    }
-
-    @Deactivate
-    void deactivate() {
-        close();
-    }
-}
diff --git a/opendaylight/config/netty-threadgroup-config/src/main/java/org/opendaylight/controller/config/yang/netty/threadgroup/package-info.java b/opendaylight/config/netty-threadgroup-config/src/main/java/org/opendaylight/controller/config/yang/netty/threadgroup/package-info.java
deleted file mode 100644 (file)
index f5b65ee..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-@org.osgi.service.component.annotations.RequireServiceComponentRuntime
-package org.opendaylight.controller.config.yang.netty.threadgroup;
\ No newline at end of file
diff --git a/opendaylight/config/netty-timer-config/pom.xml b/opendaylight/config/netty-timer-config/pom.xml
deleted file mode 100644 (file)
index b1cc6cd..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.opendaylight.odlparent</groupId>
-    <artifactId>bundle-parent</artifactId>
-    <version>13.0.10</version>
-    <relativePath/>
-  </parent>
-
-  <groupId>org.opendaylight.controller</groupId>
-  <artifactId>netty-timer-config</artifactId>
-  <version>0.20.0-SNAPSHOT</version>
-  <packaging>bundle</packaging>
-  <name>${project.artifactId}</name>
-  <description>Configuration Wrapper around netty's timer</description>
-
-  <dependencies>
-    <dependency>
-      <groupId>io.netty</groupId>
-      <artifactId>netty-common</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.jdt</groupId>
-      <artifactId>org.eclipse.jdt.annotation</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.osgi</groupId>
-      <artifactId>org.osgi.service.component.annotations</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.osgi</groupId>
-      <artifactId>org.osgi.service.metatype.annotations</artifactId>
-    </dependency>
-  </dependencies>
-</project>
diff --git a/opendaylight/config/netty-timer-config/src/main/java/org/opendaylight/controller/config/yang/netty/timer/HashedWheelTimerCloseable.java b/opendaylight/config/netty-timer-config/src/main/java/org/opendaylight/controller/config/yang/netty/timer/HashedWheelTimerCloseable.java
deleted file mode 100644 (file)
index 7bc1352..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.netty.timer;
-
-import io.netty.util.HashedWheelTimer;
-import io.netty.util.Timeout;
-import io.netty.util.Timer;
-import io.netty.util.TimerTask;
-import java.util.Set;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.TimeUnit;
-import org.eclipse.jdt.annotation.Nullable;
-
-public final class HashedWheelTimerCloseable implements AutoCloseable, Timer {
-
-    private final Timer timer;
-
-    private HashedWheelTimerCloseable(final Timer timer) {
-        this.timer = timer;
-    }
-
-    @Override
-    public void close() {
-        stop();
-    }
-
-    @Override
-    public Timeout newTimeout(final TimerTask task, final long delay, final TimeUnit unit) {
-        return this.timer.newTimeout(task, delay, unit);
-    }
-
-    @Override
-    public Set<Timeout> stop() {
-        return this.timer.stop();
-    }
-
-    public static HashedWheelTimerCloseable newInstance(final @Nullable Long duration,
-            final @Nullable Integer ticksPerWheel) {
-        return newInstance(null, duration, ticksPerWheel);
-    }
-
-    public static HashedWheelTimerCloseable newInstance(final @Nullable ThreadFactory threadFactory,
-            final @Nullable Long duration, final @Nullable Integer ticksPerWheel) {
-        TimeUnit unit = TimeUnit.MILLISECONDS;
-        if (!nullOrNonPositive(duration) && threadFactory == null && nullOrNonPositive(ticksPerWheel)) {
-            return new HashedWheelTimerCloseable(new HashedWheelTimer(duration, unit));
-        }
-
-        if (!nullOrNonPositive(duration) && threadFactory == null && !nullOrNonPositive(ticksPerWheel)) {
-            return new HashedWheelTimerCloseable(new HashedWheelTimer(duration, unit, ticksPerWheel));
-        }
-
-        if (nullOrNonPositive(duration) && threadFactory != null && nullOrNonPositive(ticksPerWheel)) {
-            return new HashedWheelTimerCloseable(new HashedWheelTimer(threadFactory));
-        }
-
-        if (!nullOrNonPositive(duration) && threadFactory != null && nullOrNonPositive(ticksPerWheel)) {
-            return new HashedWheelTimerCloseable(
-                    new HashedWheelTimer(threadFactory, duration, unit));
-        }
-
-        if (!nullOrNonPositive(duration) && threadFactory != null && !nullOrNonPositive(ticksPerWheel)) {
-            return new HashedWheelTimerCloseable(
-                    new HashedWheelTimer(threadFactory, duration, unit, ticksPerWheel));
-        }
-
-        return new HashedWheelTimerCloseable(new HashedWheelTimer());
-    }
-
-    private static boolean nullOrNonPositive(final Number num) {
-        return num == null || num.longValue() <= 0;
-    }
-}
diff --git a/opendaylight/config/netty-timer-config/src/main/java/org/opendaylight/controller/config/yang/netty/timer/OSGiGlobalTimer.java b/opendaylight/config/netty-timer-config/src/main/java/org/opendaylight/controller/config/yang/netty/timer/OSGiGlobalTimer.java
deleted file mode 100644 (file)
index cb2eb70..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2020 PANTHEON.tech, s.r.o. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.netty.timer;
-
-import io.netty.util.Timeout;
-import io.netty.util.Timer;
-import io.netty.util.TimerTask;
-import java.util.Set;
-import java.util.concurrent.TimeUnit;
-import org.osgi.service.component.annotations.Activate;
-import org.osgi.service.component.annotations.Component;
-import org.osgi.service.component.annotations.Deactivate;
-import org.osgi.service.metatype.annotations.AttributeDefinition;
-import org.osgi.service.metatype.annotations.Designate;
-import org.osgi.service.metatype.annotations.ObjectClassDefinition;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@Component(immediate = true, configurationPid = "org.opendaylight.netty.timer", property = "type=global-timer")
-@Designate(ocd = OSGiGlobalTimer.Config.class)
-public final class OSGiGlobalTimer implements Timer {
-    @ObjectClassDefinition
-    public @interface Config {
-        @AttributeDefinition(name = "tick-duration")
-        long tickDuration() default 0;
-        @AttributeDefinition(name = "ticks-per-wheel")
-        int ticksPerWheel() default 0;
-    }
-
-    private static final Logger LOG = LoggerFactory.getLogger(OSGiGlobalTimer.class);
-
-    private Timer delegate;
-
-    @Activate
-    public OSGiGlobalTimer(final Config config) {
-        delegate = HashedWheelTimerCloseable.newInstance(config.tickDuration(), config.ticksPerWheel());
-        LOG.info("Global Netty timer started");
-    }
-
-    @Deactivate
-    void deactivate() {
-        delegate.stop();
-        delegate = null;
-        LOG.info("Global Netty timer stopped");
-    }
-
-    @Override
-    public Timeout newTimeout(final TimerTask task, final long delay, final TimeUnit unit) {
-        return delegate.newTimeout(task, delay, unit);
-    }
-
-    @Override
-    public Set<Timeout> stop() {
-        LOG.warn("Attepted to stop global timer", new Throwable());
-        return Set.of();
-    }
-}
diff --git a/opendaylight/config/pom.xml b/opendaylight/config/pom.xml
deleted file mode 100644 (file)
index 1d9dffe..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.opendaylight.odlparent</groupId>
-    <artifactId>odlparent-lite</artifactId>
-    <version>13.0.10</version>
-    <relativePath/>
-  </parent>
-
-  <groupId>org.opendaylight.controller</groupId>
-  <artifactId>config-aggregator</artifactId>
-  <version>0.20.0-SNAPSHOT</version>
-  <packaging>pom</packaging>
-
-  <properties>
-    <maven.deploy.skip>true</maven.deploy.skip>
-    <maven.install.skip>true</maven.install.skip>
-  </properties>
-
-  <modules>
-    <module>threadpool-config-api</module>
-    <module>threadpool-config-impl</module>
-    <module>netty-threadgroup-config</module>
-    <module>netty-event-executor-config</module>
-    <module>netty-timer-config</module>
-  </modules>
-</project>
diff --git a/opendaylight/config/threadpool-config-api/pom.xml b/opendaylight/config/threadpool-config-api/pom.xml
deleted file mode 100644 (file)
index a889ae9..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.opendaylight.odlparent</groupId>
-    <artifactId>bundle-parent</artifactId>
-    <version>13.0.10</version>
-    <relativePath/>
-  </parent>
-
-  <groupId>org.opendaylight.controller</groupId>
-  <artifactId>threadpool-config-api</artifactId>
-  <version>0.20.0-SNAPSHOT</version>
-  <packaging>bundle</packaging>
-  <name>${project.artifactId}</name>
-</project>
diff --git a/opendaylight/config/threadpool-config-api/src/main/java/org/opendaylight/controller/config/threadpool/ScheduledThreadPool.java b/opendaylight/config/threadpool-config-api/src/main/java/org/opendaylight/controller/config/threadpool/ScheduledThreadPool.java
deleted file mode 100644 (file)
index 79ed26b..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-
-package org.opendaylight.controller.config.threadpool;
-
-import java.util.concurrent.ScheduledExecutorService;
-
-/**
- * Interface representing scheduled {@link ThreadPool}.
- */
-public interface ScheduledThreadPool extends ThreadPool {
-
-    @Override
-    ScheduledExecutorService getExecutor();
-}
\ No newline at end of file
diff --git a/opendaylight/config/threadpool-config-api/src/main/java/org/opendaylight/controller/config/threadpool/ThreadPool.java b/opendaylight/config/threadpool-config-api/src/main/java/org/opendaylight/controller/config/threadpool/ThreadPool.java
deleted file mode 100644 (file)
index 68ecb80..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-
-package org.opendaylight.controller.config.threadpool;
-
-import java.util.concurrent.ExecutorService;
-
-/**
- * Interface representing thread pool.
- */
-public interface ThreadPool {
-
-    ExecutorService getExecutor();
-
-    int getMaxThreadCount();
-}
\ No newline at end of file
diff --git a/opendaylight/config/threadpool-config-impl/pom.xml b/opendaylight/config/threadpool-config-impl/pom.xml
deleted file mode 100644 (file)
index b261e14..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.opendaylight.odlparent</groupId>
-    <artifactId>bundle-parent</artifactId>
-    <version>13.0.10</version>
-    <relativePath/>
-  </parent>
-
-  <groupId>org.opendaylight.controller</groupId>
-  <artifactId>threadpool-config-impl</artifactId>
-  <version>0.20.0-SNAPSHOT</version>
-  <packaging>bundle</packaging>
-  <name>${project.artifactId}</name>
-
-  <dependencyManagement>
-    <dependencies>
-      <dependency>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>controller-artifacts</artifactId>
-        <version>9.0.0-SNAPSHOT</version>
-        <type>pom</type>
-        <scope>import</scope>
-      </dependency>
-    </dependencies>
-  </dependencyManagement>
-
-  <dependencies>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>threadpool-config-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>com.google.guava</groupId>
-      <artifactId>guava</artifactId>
-    </dependency>
-  </dependencies>
-</project>
diff --git a/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/threadpool/util/FixedThreadPoolWrapper.java b/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/threadpool/util/FixedThreadPoolWrapper.java
deleted file mode 100644 (file)
index 2dad264..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-
-package org.opendaylight.controller.config.threadpool.util;
-
-import java.io.Closeable;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
-import org.opendaylight.controller.config.threadpool.ThreadPool;
-
-/**
- * Implementation of {@link ThreadPool} using fixed number of threads wraps
- * {@link ExecutorService}.
- */
-public class FixedThreadPoolWrapper implements ThreadPool, Closeable {
-
-    private final ThreadPoolExecutor executor;
-
-    public FixedThreadPoolWrapper(int threadCount, ThreadFactory factory) {
-        this.executor = (ThreadPoolExecutor) Executors.newFixedThreadPool(threadCount, factory);
-        executor.prestartAllCoreThreads();
-    }
-
-    @Override
-    public ExecutorService getExecutor() {
-        return Executors.unconfigurableExecutorService(executor);
-    }
-
-    @Override
-    public void close() {
-        executor.shutdown();
-    }
-
-    @Override
-    public int getMaxThreadCount() {
-        return executor.getMaximumPoolSize();
-    }
-
-    public void setMaxThreadCount(int maxThreadCount) {
-        executor.setCorePoolSize(maxThreadCount);
-        executor.setMaximumPoolSize(maxThreadCount);
-    }
-}
diff --git a/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/threadpool/util/FlexibleThreadPoolWrapper.java b/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/threadpool/util/FlexibleThreadPoolWrapper.java
deleted file mode 100644 (file)
index 6fb1adc..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.threadpool.util;
-
-import java.io.Closeable;
-import java.util.OptionalInt;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.RejectedExecutionException;
-import java.util.concurrent.RejectedExecutionHandler;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-import org.opendaylight.controller.config.threadpool.ThreadPool;
-
-/**
- * Implementation of {@link ThreadPool} using flexible number of threads wraps
- * {@link ExecutorService}.
- */
-public class FlexibleThreadPoolWrapper implements ThreadPool, Closeable {
-    private final ThreadPoolExecutor executor;
-
-    public FlexibleThreadPoolWrapper(final int minThreadCount, final int maxThreadCount, final long keepAlive,
-            final TimeUnit timeUnit, final ThreadFactory threadFactory) {
-        this(minThreadCount, maxThreadCount, keepAlive, timeUnit, threadFactory, getQueue(OptionalInt.empty()));
-    }
-
-    public FlexibleThreadPoolWrapper(final int minThreadCount, final int maxThreadCount, final long keepAlive,
-            final TimeUnit timeUnit, final ThreadFactory threadFactory, final OptionalInt queueCapacity) {
-        this(minThreadCount, maxThreadCount, keepAlive, timeUnit, threadFactory, getQueue(queueCapacity));
-    }
-
-    private FlexibleThreadPoolWrapper(final int minThreadCount, final int maxThreadCount, final long keepAlive,
-            final TimeUnit timeUnit, final ThreadFactory threadFactory, final BlockingQueue<Runnable> queue) {
-
-        executor = new ThreadPoolExecutor(minThreadCount, maxThreadCount, keepAlive, timeUnit,
-                queue, threadFactory, new FlexibleRejectionHandler());
-        executor.prestartAllCoreThreads();
-    }
-
-    /**
-     * Overriding the queue:
-     * ThreadPoolExecutor would not create new threads if the queue is not full, thus adding
-     * occurs in RejectedExecutionHandler.
-     * This impl saturates threadpool first, then queue. When both are full caller will get blocked.
-     */
-    private static ForwardingBlockingQueue getQueue(final OptionalInt capacity) {
-        return new ForwardingBlockingQueue(
-            capacity.isPresent() ? new LinkedBlockingQueue<>(capacity.orElseThrow()) : new LinkedBlockingQueue<>());
-    }
-
-    @Override
-    public ExecutorService getExecutor() {
-        return Executors.unconfigurableExecutorService(executor);
-    }
-
-    public int getMinThreadCount() {
-        return executor.getCorePoolSize();
-    }
-
-    public void setMinThreadCount(final int minThreadCount) {
-        executor.setCorePoolSize(minThreadCount);
-    }
-
-    @Override
-    public int getMaxThreadCount() {
-        return executor.getMaximumPoolSize();
-    }
-
-    public void setMaxThreadCount(final int maxThreadCount) {
-        executor.setMaximumPoolSize(maxThreadCount);
-    }
-
-    public long getKeepAliveMillis() {
-        return executor.getKeepAliveTime(TimeUnit.MILLISECONDS);
-    }
-
-    public void setKeepAliveMillis(final long keepAliveMillis) {
-        executor.setKeepAliveTime(keepAliveMillis, TimeUnit.MILLISECONDS);
-    }
-
-    public void setThreadFactory(final ThreadFactory threadFactory) {
-        executor.setThreadFactory(threadFactory);
-    }
-
-    public void prestartAllCoreThreads() {
-        executor.prestartAllCoreThreads();
-    }
-
-    @Override
-    public void close() {
-        executor.shutdown();
-    }
-
-    /**
-     * if the max threads are met, then it will raise a rejectedExecution. We then push to the queue.
-     */
-    private static final class FlexibleRejectionHandler implements RejectedExecutionHandler {
-        @Override
-        @SuppressWarnings("checkstyle:parameterName")
-        public void rejectedExecution(final Runnable r, final ThreadPoolExecutor executor) {
-            try {
-                executor.getQueue().put(r);
-            } catch (InterruptedException e) {
-                throw new RejectedExecutionException("Interrupted while waiting on the queue", e);
-            }
-        }
-    }
-
-    private static final class ForwardingBlockingQueue
-            extends com.google.common.util.concurrent.ForwardingBlockingQueue<Runnable> {
-        private final BlockingQueue<Runnable> delegate;
-
-        ForwardingBlockingQueue(final BlockingQueue<Runnable> delegate) {
-            this.delegate = delegate;
-        }
-
-        @Override
-        protected BlockingQueue<Runnable> delegate() {
-            return delegate;
-        }
-
-        @Override
-        @SuppressWarnings("checkstyle:parameterName")
-        public boolean offer(final Runnable o) {
-            // ThreadPoolExecutor will spawn a new thread after core size is reached only
-            // if the queue.offer returns false.
-            return false;
-        }
-    }
-}
diff --git a/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/threadpool/util/NamingThreadPoolFactory.java b/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/threadpool/util/NamingThreadPoolFactory.java
deleted file mode 100644 (file)
index 0efa482..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.threadpool.util;
-
-import static java.util.Objects.requireNonNull;
-
-import java.io.Closeable;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.atomic.AtomicLong;
-
-/**
- * Implementation of {@link ThreadFactory}. This class is thread-safe.
- */
-public class NamingThreadPoolFactory implements ThreadFactory, Closeable {
-
-    private final ThreadGroup group;
-    private final String namePrefix;
-    private final AtomicLong threadName = new AtomicLong();
-
-    public NamingThreadPoolFactory(final String namePrefix) {
-        this.namePrefix = requireNonNull(namePrefix);
-        this.group = new ThreadGroup(namePrefix);
-    }
-
-    @Override
-    @SuppressWarnings("checkstyle:parameterName")
-    public Thread newThread(final Runnable r) {
-        return new Thread(group, r, String.format("%s-%d", group.getName(), threadName.incrementAndGet()));
-    }
-
-    @Override
-    public void close() {
-    }
-
-    public String getNamePrefix() {
-        return namePrefix;
-    }
-}
diff --git a/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/threadpool/util/ScheduledThreadPoolWrapper.java b/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/threadpool/util/ScheduledThreadPoolWrapper.java
deleted file mode 100644 (file)
index 648bd82..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-
-package org.opendaylight.controller.config.threadpool.util;
-
-import java.io.Closeable;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.ScheduledThreadPoolExecutor;
-import java.util.concurrent.ThreadFactory;
-import org.opendaylight.controller.config.threadpool.ScheduledThreadPool;
-
-/**
- * Implementation of {@link ScheduledThreadPool} wraps
- * {@link ScheduledExecutorService}.
- */
-public class ScheduledThreadPoolWrapper implements ScheduledThreadPool, Closeable {
-
-    private final ScheduledThreadPoolExecutor executor;
-    private final int threadCount;
-
-    public ScheduledThreadPoolWrapper(int threadCount, ThreadFactory factory) {
-        this.threadCount = threadCount;
-        this.executor = new ScheduledThreadPoolExecutor(threadCount, factory);
-        executor.prestartAllCoreThreads();
-    }
-
-    @Override
-    public ScheduledExecutorService getExecutor() {
-        return Executors.unconfigurableScheduledExecutorService(executor);
-    }
-
-    @Override
-    public void close() {
-        executor.shutdown();
-    }
-
-    @Override
-    public int getMaxThreadCount() {
-        return threadCount;
-    }
-
-}
diff --git a/pom.xml b/pom.xml
index 341b3fe69088f4c7106893f0378e80fb75291192..a05f2b9ef62961c12f459c67946d118f33761f8c 100644 (file)
--- a/pom.xml
+++ b/pom.xml
     <module>benchmark</module>
     <module>jolokia</module>
 
-    <!-- md-sal -->
-    <module>opendaylight/md-sal</module>
-    <!-- config -->
-    <module>opendaylight/config</module>
-
     <module>opendaylight/blueprint</module>
+    <module>opendaylight/md-sal</module>
   </modules>
 
   <profiles>