Showing
1 changed file
with
3 additions
and
2 deletions
... | @@ -36,6 +36,7 @@ public class SimpleHostStore { | ... | @@ -36,6 +36,7 @@ public class SimpleHostStore { |
36 | 36 | ||
37 | // hosts sorted based on their location | 37 | // hosts sorted based on their location |
38 | private final Multimap<ConnectPoint, Host> locations = HashMultimap.create(); | 38 | private final Multimap<ConnectPoint, Host> locations = HashMultimap.create(); |
39 | + | ||
39 | /** | 40 | /** |
40 | * Creates a new host or updates the existing one based on the specified | 41 | * Creates a new host or updates the existing one based on the specified |
41 | * description. | 42 | * description. |
... | @@ -62,7 +63,7 @@ public class SimpleHostStore { | ... | @@ -62,7 +63,7 @@ public class SimpleHostStore { |
62 | descr.vlan(), | 63 | descr.vlan(), |
63 | descr.location(), | 64 | descr.location(), |
64 | descr.ipAddresses()); | 65 | descr.ipAddresses()); |
65 | - synchronized(this) { | 66 | + synchronized (this) { |
66 | hosts.put(hostId, newhost); | 67 | hosts.put(hostId, newhost); |
67 | locations.put(descr.location(), newhost); | 68 | locations.put(descr.location(), newhost); |
68 | } | 69 | } |
... | @@ -104,7 +105,7 @@ public class SimpleHostStore { | ... | @@ -104,7 +105,7 @@ public class SimpleHostStore { |
104 | * @return remove even or null if host was not found | 105 | * @return remove even or null if host was not found |
105 | */ | 106 | */ |
106 | HostEvent removeHost(HostId hostId) { | 107 | HostEvent removeHost(HostId hostId) { |
107 | - synchronized(this) { | 108 | + synchronized (this) { |
108 | Host host = hosts.remove(hostId); | 109 | Host host = hosts.remove(hostId); |
109 | if (host != null) { | 110 | if (host != null) { |
110 | locations.remove((host.location()), host); | 111 | locations.remove((host.location()), host); | ... | ... |
-
Please register or login to post a comment