Merge pull request #448 from y-higuchi/pluggable_path_computation
Tiny bug fix on Topology
diff --git a/src/main/java/net/onrc/onos/datagrid/HazelcastDatagrid.java b/src/main/java/net/onrc/onos/datagrid/HazelcastDatagrid.java
index 3b34a35..d04e50a 100644
--- a/src/main/java/net/onrc/onos/datagrid/HazelcastDatagrid.java
+++ b/src/main/java/net/onrc/onos/datagrid/HazelcastDatagrid.java
@@ -166,6 +166,12 @@
* @param event the notification event for the entry.
*/
public void entryAdded(EntryEvent event) {
+ //
+ // NOTE: Ignore Flow Entries Events originated by this instance
+ //
+ if (event.getMember().localMember())
+ return;
+
Long keyLong = (Long)event.getKey();
byte[] valueBytes = (byte[])event.getValue();
@@ -185,6 +191,12 @@
* @param event the notification event for the entry.
*/
public void entryRemoved(EntryEvent event) {
+ //
+ // NOTE: Ignore Flow Entries Events originated by this instance
+ //
+ if (event.getMember().localMember())
+ return;
+
Long keyLong = (Long)event.getKey();
byte[] valueBytes = (byte[])event.getValue();
@@ -204,6 +216,12 @@
* @param event the notification event for the entry.
*/
public void entryUpdated(EntryEvent event) {
+ //
+ // NOTE: Ignore Flow Entries Events originated by this instance
+ //
+ if (event.getMember().localMember())
+ return;
+
Long keyLong = (Long)event.getKey();
byte[] valueBytes = (byte[])event.getValue();
diff --git a/src/main/java/net/onrc/onos/datagrid/web/GetMapResource.java b/src/main/java/net/onrc/onos/datagrid/web/GetMapResource.java
index 6c66c90..124ac28 100644
--- a/src/main/java/net/onrc/onos/datagrid/web/GetMapResource.java
+++ b/src/main/java/net/onrc/onos/datagrid/web/GetMapResource.java
@@ -75,7 +75,7 @@
Collection<TopologyElement> topologyElements = datagridService.getAllTopologyElements();
result += "Topology:\n";
for (TopologyElement topologyElement : topologyElements) {
- result += topologyElements.toString() + "\n";
+ result += topologyElement.toString() + "\n";
}
}