Began implementation of per-switch leader election using Curator
diff --git a/src/main/java/net/floodlightcontroller/mastership/IMastershipService.java b/src/main/java/net/floodlightcontroller/mastership/IMastershipService.java
index 322210e..b3ddda5 100644
--- a/src/main/java/net/floodlightcontroller/mastership/IMastershipService.java
+++ b/src/main/java/net/floodlightcontroller/mastership/IMastershipService.java
@@ -4,8 +4,14 @@
public interface IMastershipService extends IFloodlightService {
+ // Callback for all mastership changes.
+ // Change callback is called when mastership is acquired or released
+ public interface MastershipCallback {
+ public void changeCallback(long dpid, boolean isMaster);
+ }
+
// Acquire mastership for a switch.
- public void acquireMastership(long dpid, boolean blockOk);
+ public void acquireMastership(long dpid, MastershipCallback cb);
// Release mastership for a switch
public void releaseMastership(long dpid);