Implemented the read side of the topology lock
Change-Id: I5ee9a8973f5700c357127b92a581f1f24af87dc1
diff --git a/src/main/java/net/onrc/onos/ofcontroller/networkgraph/NetworkGraph.java b/src/main/java/net/onrc/onos/ofcontroller/networkgraph/NetworkGraph.java
index 45e4188..58c24ad 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/networkgraph/NetworkGraph.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/networkgraph/NetworkGraph.java
@@ -80,4 +80,17 @@
* @return the network device for the MAC address if found, otherwise null.
*/
public Device getDeviceByMac(MACAddress address);
+
+ /**
+ * Acquire a read lock on the entire topology. The topology will not
+ * change while readers have the lock. Must be released using
+ * {@link releaseLock()}. This method will block until a read lock is
+ * available.
+ */
+ public void acquireLock();
+
+ /**
+ * Release the read lock on the topology.
+ */
+ public void releaseLock();
}