Ignore Flow Entries Events originated by this instance.
NOTE: For the other type of events, the events originated by the
local instance are not ignored, because this is how they are intercepted
and processed internally.
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();