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
Thomas Vachuska
2015-03-17 14:10:52 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ff9652358eee56c186bd5647fa77a3c9595179b3
ff965235
1 parent
7648d662
Fixing the 'wrong subject' bug.
Change-Id: I6a3497057406f5fffc5cc2a46db2174b20c2ff43
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
core/api/src/main/java/org/onosproject/store/cluster/messaging/ClusterMessage.java
core/store/dist/src/main/java/org/onosproject/store/packet/impl/DistributedPacketStore.java
core/api/src/main/java/org/onosproject/store/cluster/messaging/ClusterMessage.java
View file @
ff96523
...
...
@@ -141,7 +141,7 @@ public class ClusterMessage {
buffer
.
get
(
payloadBytes
);
return
new
ClusterMessage
(
new
NodeId
(
new
String
(
senderBytes
,
Charsets
.
UTF_8
)),
new
MessageSubject
(
new
String
(
s
ender
Bytes
,
Charsets
.
UTF_8
)),
new
MessageSubject
(
new
String
(
s
ubject
Bytes
,
Charsets
.
UTF_8
)),
payloadBytes
);
}
...
...
core/store/dist/src/main/java/org/onosproject/store/packet/impl/DistributedPacketStore.java
View file @
ff96523
...
...
@@ -61,13 +61,13 @@ public class DistributedPacketStore
private
static
final
int
MESSAGE_HANDLER_THREAD_POOL_SIZE
=
4
;
@Reference
(
cardinality
=
ReferenceCardinality
.
MANDATORY_UNARY
)
pr
ivate
MastershipService
mastershipService
;
pr
otected
MastershipService
mastershipService
;
@Reference
(
cardinality
=
ReferenceCardinality
.
MANDATORY_UNARY
)
pr
ivate
ClusterService
clusterService
;
pr
otected
ClusterService
clusterService
;
@Reference
(
cardinality
=
ReferenceCardinality
.
MANDATORY_UNARY
)
pr
ivate
ClusterCommunicationService
communicationService
;
pr
otected
ClusterCommunicationService
communicationService
;
private
static
final
MessageSubject
PACKET_OUT_SUBJECT
=
new
MessageSubject
(
"packet-out"
);
...
...
@@ -90,8 +90,9 @@ public class DistributedPacketStore
MESSAGE_HANDLER_THREAD_POOL_SIZE
,
groupedThreads
(
"onos/store/packet"
,
"message-handlers"
));
communicationService
.
addSubscriber
(
PACKET_OUT_SUBJECT
,
new
InternalClusterMessageHandler
(),
messageHandlingExecutor
);
communicationService
.
addSubscriber
(
PACKET_OUT_SUBJECT
,
new
InternalClusterMessageHandler
(),
messageHandlingExecutor
);
log
.
info
(
"Started"
);
}
...
...
@@ -118,8 +119,9 @@ public class DistributedPacketStore
}
// TODO check unicast return value
communicationService
.
unicast
(
new
ClusterMessage
(
myId
,
PACKET_OUT_SUBJECT
,
SERIALIZER
.
encode
(
packet
)),
master
);
communicationService
.
unicast
(
new
ClusterMessage
(
myId
,
PACKET_OUT_SUBJECT
,
SERIALIZER
.
encode
(
packet
)),
master
);
// error log: log.warn("Failed to send packet-out to {}", master);
}
...
...
Please
register
or
login
to post a comment