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
tom
2014-09-11 10:52:10 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e615ee42bc12d5717a21e4c9d83fc4c0426e8400
e615ee42
1 parent
2afb119d
Re-assembled the topology subsystem.
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
core/trivial/src/main/java/org/onlab/onos/net/trivial/impl/SimpleHostStore.java
core/trivial/src/main/java/org/onlab/onos/net/trivial/impl/SimpleHostStore.java
View file @
e615ee4
...
...
@@ -36,6 +36,7 @@ public class SimpleHostStore {
// hosts sorted based on their location
private
final
Multimap
<
ConnectPoint
,
Host
>
locations
=
HashMultimap
.
create
();
/**
* Creates a new host or updates the existing one based on the specified
* description.
...
...
@@ -62,7 +63,7 @@ public class SimpleHostStore {
descr
.
vlan
(),
descr
.
location
(),
descr
.
ipAddresses
());
synchronized
(
this
)
{
synchronized
(
this
)
{
hosts
.
put
(
hostId
,
newhost
);
locations
.
put
(
descr
.
location
(),
newhost
);
}
...
...
@@ -104,7 +105,7 @@ public class SimpleHostStore {
* @return remove even or null if host was not found
*/
HostEvent
removeHost
(
HostId
hostId
)
{
synchronized
(
this
)
{
synchronized
(
this
)
{
Host
host
=
hosts
.
remove
(
hostId
);
if
(
host
!=
null
)
{
locations
.
remove
((
host
.
location
()),
host
);
...
...
Please
register
or
login
to post a comment