diff options
author | Maros Marsalek <mmarsale@cisco.com> | 2016-08-17 15:38:01 +0200 |
---|---|---|
committer | Maros Marsalek <mmarsale@cisco.com> | 2016-08-19 12:49:56 +0200 |
commit | 3341ac467cc08ac95f937945c7502ac4a019d805 (patch) | |
tree | 1b13df9f8709d123c6fe50a9fa21d3686554e65f /infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NettyThreadGroupProvider.groovy | |
parent | 672f0c90fdbf4b5dc60cbfaaaf262e16561fdb7a (diff) |
Make Restconf thread pools configurable
Change-Id: Ie03a1fde5181cfd8457e36d67afc2cc0c69c1e1d
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Diffstat (limited to 'infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NettyThreadGroupProvider.groovy')
-rw-r--r-- | infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NettyThreadGroupProvider.groovy | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NettyThreadGroupProvider.groovy b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NettyThreadGroupProvider.groovy index da5f3d5b2..bff8e3d8e 100644 --- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NettyThreadGroupProvider.groovy +++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NettyThreadGroupProvider.groovy @@ -16,13 +16,13 @@ package io.fd.honeycomb.infra.distro.netconf +import com.google.common.util.concurrent.ThreadFactoryBuilder import com.google.inject.Inject import groovy.transform.ToString import groovy.util.logging.Slf4j -import io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration import io.fd.honeycomb.infra.distro.ProviderTrait +import io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration import io.netty.channel.nio.NioEventLoopGroup - /** * Mirror of org.opendaylight.controller.config.yang.netty.threadgroup.NettyThreadgroupModule */ @@ -35,8 +35,7 @@ class NettyThreadGroupProvider extends ProviderTrait<NioEventLoopGroup> { @Override def create() { - cfgAttributes.netconfNettyThreads.isPresent() ? - new NioEventLoopGroup(cfgAttributes.netconfNettyThreads.get()) : - new NioEventLoopGroup() + new NioEventLoopGroup(cfgAttributes.netconfNettyThreads, + new ThreadFactoryBuilder().setNameFormat("netconf-netty-%d").build()) } } |