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
Madan Jampani
2014-10-07 14:36:00 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a5d0d78861758cbd28f3ab179c472ee4356c82df
a5d0d788
1 parent
a8474a19
Using ClusterService in ClusterCommunicationManager (NPE fix)
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletions
apps/foo/src/main/java/org/onlab/onos/foo/SimpleNettyServer.java
core/store/dist/src/main/java/org/onlab/onos/store/cluster/messaging/impl/ClusterCommunicationManager.java
apps/foo/src/main/java/org/onlab/onos/foo/SimpleNettyServer.java
View file @
a5d0d78
...
...
@@ -8,7 +8,7 @@ import org.slf4j.LoggerFactory;
/**
* Test to measure Messaging performance.
*/
public
class
SimpleNettyServer
{
public
final
class
SimpleNettyServer
{
private
static
Logger
log
=
LoggerFactory
.
getLogger
(
IOLoopTestServer
.
class
);
private
SimpleNettyServer
()
{}
...
...
core/store/dist/src/main/java/org/onlab/onos/store/cluster/messaging/impl/ClusterCommunicationManager.java
View file @
a5d0d78
...
...
@@ -12,7 +12,10 @@ import java.util.TimerTask;
import
org.apache.felix.scr.annotations.Activate
;
import
org.apache.felix.scr.annotations.Component
;
import
org.apache.felix.scr.annotations.Deactivate
;
import
org.apache.felix.scr.annotations.Reference
;
import
org.apache.felix.scr.annotations.ReferenceCardinality
;
import
org.apache.felix.scr.annotations.Service
;
import
org.onlab.onos.cluster.ClusterService
;
import
org.onlab.onos.cluster.ControllerNode
;
import
org.onlab.onos.cluster.NodeId
;
import
org.onlab.onos.store.cluster.impl.ClusterMembershipEvent
;
...
...
@@ -42,6 +45,10 @@ public class ClusterCommunicationManager
private
final
Logger
log
=
LoggerFactory
.
getLogger
(
getClass
());
private
ControllerNode
localNode
;
@Reference
(
cardinality
=
ReferenceCardinality
.
MANDATORY_UNARY
)
private
ClusterService
clusterService
;
private
ClusterNodesDelegate
nodesDelegate
;
// FIXME: `members` should go away and should be using ClusterService
private
Map
<
NodeId
,
ControllerNode
>
members
=
new
HashMap
<>();
...
...
@@ -65,6 +72,7 @@ public class ClusterCommunicationManager
@Activate
public
void
activate
()
{
localNode
=
clusterService
.
getLocalNode
();
messagingService
=
new
NettyMessagingService
(
localNode
.
tcpPort
());
log
.
info
(
"Started"
);
}
...
...
Please
register
or
login
to post a comment