*/
package org.opendaylight.protocol.framework;
-import java.io.Closeable;
-import java.net.InetSocketAddress;
-import java.net.SocketAddress;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
import com.google.common.base.Preconditions;
-
import io.netty.bootstrap.Bootstrap;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.buffer.PooledByteBufAllocator;
import io.netty.util.concurrent.Future;
import io.netty.util.concurrent.GlobalEventExecutor;
import io.netty.util.concurrent.Promise;
+import java.io.Closeable;
+import java.net.InetSocketAddress;
+import java.net.SocketAddress;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Dispatcher class for creating servers and clients. The idea is to first create servers and clients and the run the
@Deprecated
@Override
public void close() {
- try {
- this.workerGroup.shutdownGracefully();
- } finally {
- this.bossGroup.shutdownGracefully();
- }
}
}
base "config:service-type";
config:java-class "io.netty.channel.EventLoopGroup";
+ config:disable-osgi-service-registration;
}
identity netty-event-executor {
base "config:service-type";
config:java-class "io.netty.util.concurrent.EventExecutor";
+ config:disable-osgi-service-registration;
}
identity netty-timer {
base "config:service-type";
config:java-class "io.netty.util.Timer";
+ config:disable-osgi-service-registration;
}
identity channel-factory {
base "config:service-type";
config:java-class "io.netty.bootstrap.ChannelFactory";
+ config:disable-osgi-service-registration;
}
}
<argument value="${global-boss-group-thread-count}"/>
</bean>
- <service ref="globalBossGroup" interface="io.netty.channel.EventLoopGroup" odl:type="global-boss-group"/>
+ <service ref="globalBossGroup" interface="io.netty.channel.EventLoopGroup" odl:type="global-boss-group">
+ <service-properties>
+ <entry key="config-module-namespace" value="urn:opendaylight:params:xml:ns:yang:controller:netty:threadgroup"/>
+ <entry key="config-module-name" value="netty-threadgroup-fixed"/>
+ <entry key="config-instance-name" value="global-boss-group"/>
+ </service-properties>
+ </service>
<bean id="globalWorkerGroup" class="org.opendaylight.controller.config.yang.netty.threadgroup.NioEventLoopGroupCloseable"
factory-method="newInstance">
<argument value="${global-worker-group-thread-count}"/>
</bean>
- <service ref="globalWorkerGroup" interface="io.netty.channel.EventLoopGroup" odl:type="global-worker-group"/>
+ <service ref="globalWorkerGroup" interface="io.netty.channel.EventLoopGroup" odl:type="global-worker-group">
+ <service-properties>
+ <entry key="config-module-namespace" value="urn:opendaylight:params:xml:ns:yang:controller:netty:threadgroup"/>
+ <entry key="config-module-name" value="netty-threadgroup-fixed"/>
+ <entry key="config-instance-name" value="global-worker-group"/>
+ </service-properties>
+ </service>
</blueprint>
<argument value="${ticks-per-wheel}"/>
</bean>
- <service ref="timer" interface="io.netty.util.Timer" odl:type="global-timer"/>
+ <service ref="timer" interface="io.netty.util.Timer" odl:type="global-timer">
+ <service-properties>
+ <entry key="config-module-namespace" value="urn:opendaylight:params:xml:ns:yang:controller:netty:timer"/>
+ <entry key="config-module-name" value="netty-hashed-wheel-timer"/>
+ <entry key="config-instance-name" value="global-timer"/>
+ </service-properties>
+ </service>
</blueprint>