Add a mechanism to elect a single leader in an ONOS cluster (ONOS-977).

Note: For now, leadership change callbacks are intentionally not implemented,
to discourage from liberally using this feature.
In the future we might have to add the callback support, but only if really
needed.

Change-Id: Ia70045aee737fbd67ec445ea7065476e3f4838aa
diff --git a/src/main/java/net/onrc/onos/registry/controller/IControllerRegistryService.java b/src/main/java/net/onrc/onos/registry/controller/IControllerRegistryService.java
index 576eed4..eb27cf9 100755
--- a/src/main/java/net/onrc/onos/registry/controller/IControllerRegistryService.java
+++ b/src/main/java/net/onrc/onos/registry/controller/IControllerRegistryService.java
@@ -70,6 +70,15 @@
 	 * @return 
 	 */
 	public boolean hasControl(long dpid);
+
+	/**
+	 * Check whether this instance is the leader for the cluster.
+	 * This call doesn't block.
+	 *
+	 * @return true if the instance is the leader for the cluster,
+	 * otherwise false.
+	 */
+	public boolean isClusterLeader();
 	
 	/**
 	 * Get the unique ID used to identify this controller in the cluster