Removed deprecated ClusterCommunicationService APIs
MessagingService::sendAsync now returns a CompletableFuture<Void> in place of boolean

Change-Id: I98134c4c0ea65b9c7e9ba705eebd1669067324ef
diff --git a/core/store/dist/src/main/java/org/onosproject/store/flow/impl/NewDistributedFlowRuleStore.java b/core/store/dist/src/main/java/org/onosproject/store/flow/impl/NewDistributedFlowRuleStore.java
index 35d004e..3b82655 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/flow/impl/NewDistributedFlowRuleStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/flow/impl/NewDistributedFlowRuleStore.java
@@ -407,21 +407,22 @@
         log.trace("Forwarding storeBatch to {}, which is the primary (master) for device {}",
                   master, deviceId);
 
-        if (!clusterCommunicator.unicast(operation,
-                                         APPLY_BATCH_FLOWS,
-                                         SERIALIZER::encode,
-                                         master)) {
-            log.warn("Failed to storeBatch: {} to {}", operation, master);
+        clusterCommunicator.unicast(operation,
+                                    APPLY_BATCH_FLOWS,
+                                    SERIALIZER::encode,
+                                    master)
+                           .whenComplete((result, error) -> {
+                               log.warn("Failed to storeBatch: {} to {}", operation, master);
 
-            Set<FlowRule> allFailures = operation.getOperations().stream()
-                    .map(op -> op.target())
-                    .collect(Collectors.toSet());
+                               Set<FlowRule> allFailures = operation.getOperations()
+                                                                    .stream()
+                                                                    .map(op -> op.target())
+                                                                    .collect(Collectors.toSet());
 
-            notifyDelegate(FlowRuleBatchEvent.completed(
-                    new FlowRuleBatchRequest(operation.id(), Collections.emptySet()),
-                    new CompletedBatchOperation(false, allFailures, deviceId)));
-            return;
-        }
+                               notifyDelegate(FlowRuleBatchEvent.completed(
+                                       new FlowRuleBatchRequest(operation.id(), Collections.emptySet()),
+                                       new CompletedBatchOperation(false, allFailures, deviceId)));
+                           });
     }
 
     private void storeBatchInternal(FlowRuleBatchOperation operation) {