LeadershipService and MastershipService/Store APIs return CompletableFutures so that callers can (optionally) chain together dependent operations

Change-Id: Ia00fcb7d98fbfce897527f67ea9690abf6fe846a
diff --git a/core/api/src/main/java/org/onosproject/mastership/MastershipAdminService.java b/core/api/src/main/java/org/onosproject/mastership/MastershipAdminService.java
index 6c41fb2..a8835fc 100644
--- a/core/api/src/main/java/org/onosproject/mastership/MastershipAdminService.java
+++ b/core/api/src/main/java/org/onosproject/mastership/MastershipAdminService.java
@@ -15,6 +15,8 @@
  */
 package org.onosproject.mastership;
 
+import java.util.concurrent.CompletableFuture;
+
 import org.onosproject.cluster.NodeId;
 import org.onosproject.net.DeviceId;
 import org.onosproject.net.MastershipRole;
@@ -30,8 +32,9 @@
      * @param instance controller instance identifier
      * @param deviceId device identifier
      * @param role     requested role
+     * @return future that is completed when the role is set
      */
-    void setRole(NodeId instance, DeviceId deviceId, MastershipRole role);
+    CompletableFuture<Void> setRole(NodeId instance, DeviceId deviceId, MastershipRole role);
 
     /**
      * Balances the mastership to be shared as evenly as possibly by all