Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Yuta HIGUCHI
2014-11-25 19:28:12 -0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f845cc37408a8dcf63476ad0db30047400194010
f845cc37
1 parent
ae1d210a
Give a name to each ThreadPool
Change-Id: Iec2b044fca542672608fd67ff43680f0d34b9da2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
apps/sdnip/src/main/java/org/onlab/onos/sdnip/bgp/BgpSessionManager.java
openflow/ctl/src/main/java/org/onlab/onos/openflow/controller/impl/Controller.java
apps/sdnip/src/main/java/org/onlab/onos/sdnip/bgp/BgpSessionManager.java
View file @
f845cc3
...
...
@@ -16,6 +16,7 @@
package
org
.
onlab
.
onos
.
sdnip
.
bgp
;
import
static
com
.
google
.
common
.
base
.
Preconditions
.
checkNotNull
;
import
static
org
.
onlab
.
util
.
Tools
.
namedThreads
;
import
java.net.InetAddress
;
import
java.net.InetSocketAddress
;
...
...
@@ -186,8 +187,8 @@ public class BgpSessionManager {
isShutdown
=
false
;
ChannelFactory
channelFactory
=
new
NioServerSocketChannelFactory
(
Executors
.
newCachedThreadPool
(),
Executors
.
newCachedThreadPool
());
new
NioServerSocketChannelFactory
(
Executors
.
newCachedThreadPool
(
namedThreads
(
"BGP-SM-boss-%d"
)
),
Executors
.
newCachedThreadPool
(
namedThreads
(
"BGP-SM-worker-%d"
)
));
ChannelPipelineFactory
pipelineFactory
=
new
ChannelPipelineFactory
()
{
@Override
public
ChannelPipeline
getPipeline
()
throws
Exception
{
...
...
openflow/ctl/src/main/java/org/onlab/onos/openflow/controller/impl/Controller.java
View file @
f845cc3
...
...
@@ -16,6 +16,8 @@
package
org
.
onlab
.
onos
.
openflow
.
controller
.
impl
;
import
static
org
.
onlab
.
util
.
Tools
.
namedThreads
;
import
java.lang.management.ManagementFactory
;
import
java.lang.management.RuntimeMXBean
;
import
java.net.InetSocketAddress
;
...
...
@@ -135,13 +137,13 @@ public class Controller {
if
(
workerThreads
==
0
)
{
execFactory
=
new
NioServerSocketChannelFactory
(
Executors
.
newCachedThreadPool
(),
Executors
.
newCachedThreadPool
());
Executors
.
newCachedThreadPool
(
namedThreads
(
"Controller-boss-%d"
)
),
Executors
.
newCachedThreadPool
(
namedThreads
(
"Controller-worker-%d"
)
));
return
new
ServerBootstrap
(
execFactory
);
}
else
{
execFactory
=
new
NioServerSocketChannelFactory
(
Executors
.
newCachedThreadPool
(),
Executors
.
newCachedThreadPool
(),
workerThreads
);
Executors
.
newCachedThreadPool
(
namedThreads
(
"Controller-boss-%d"
)
),
Executors
.
newCachedThreadPool
(
namedThreads
(
"Controller-worker-%d"
)
),
workerThreads
);
return
new
ServerBootstrap
(
execFactory
);
}
}
...
...
Please
register
or
login
to post a comment