Added Javadoc comments about recommended ordering of applying/processing
the events.
Change-Id: I21fd2b50f7be51aa1ba6a7a1456843b70cf00de6
diff --git a/src/main/java/net/onrc/onos/ofcontroller/networkgraph/INetworkGraphListener.java b/src/main/java/net/onrc/onos/ofcontroller/networkgraph/INetworkGraphListener.java
index dfdba42..b69cd80 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/networkgraph/INetworkGraphListener.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/networkgraph/INetworkGraphListener.java
@@ -10,6 +10,20 @@
/**
* Network Graph events.
*
+ * The recommended ordering rules for applying/processing the events is:
+ * (a) Process "added" events before "removed" events.
+ * (b) The ordering of the "added" events should be:
+ * addedSwitchEvents, addedPortEvents, addedLinkEvents,
+ * addedDeviceEvents
+ * The above ordering guarantees that adding a port for example
+ * will be processed after the corresponding switch itself is added.
+ * (c) The ordering of the "removed" events should be:
+ * removedDeviceEvents, removedLinkEvents, removedPortEvents,
+ * removedSwitchEvents
+ * The above ordering guarantees that removing a port for example
+ * will be processed before the corresponding switch itself is
+ * removed.
+ *
* @param addedSwitchEvents the Added Switch Events.
* @param removedSwitchEvents the Removed Switch Events.
* @param addedPortEvents the Added Port Events.