Revamped ClusterCommunicationService API

Change-Id: I9326369de3d2413b0882b324979d10483c093de9
diff --git a/apps/test/intent-perf/src/main/java/org/onosproject/intentperf/IntentPerfCollector.java b/apps/test/intent-perf/src/main/java/org/onosproject/intentperf/IntentPerfCollector.java
index a979b65..8c160e8 100644
--- a/apps/test/intent-perf/src/main/java/org/onosproject/intentperf/IntentPerfCollector.java
+++ b/apps/test/intent-perf/src/main/java/org/onosproject/intentperf/IntentPerfCollector.java
@@ -219,7 +219,7 @@
 
     private void broadcastSample(long time, NodeId nodeId, double overallRate, double currentRate) {
         String data = String.format("%d|%f|%f", time, overallRate, currentRate);
-        communicationService.broadcast(new ClusterMessage(nodeId, SAMPLE, data.getBytes()));
+        communicationService.broadcast(data, SAMPLE, str -> str.getBytes());
     }
 
     private class InternalSampleCollector implements ClusterMessageHandler {
diff --git a/apps/test/intent-perf/src/main/java/org/onosproject/intentperf/IntentPerfInstaller.java b/apps/test/intent-perf/src/main/java/org/onosproject/intentperf/IntentPerfInstaller.java
index 909f3a5..de9e9f2 100644
--- a/apps/test/intent-perf/src/main/java/org/onosproject/intentperf/IntentPerfInstaller.java
+++ b/apps/test/intent-perf/src/main/java/org/onosproject/intentperf/IntentPerfInstaller.java
@@ -249,14 +249,14 @@
     public void start() {
         if (stopped) {
             stopped = false;
-            communicationService.broadcast(new ClusterMessage(nodeId, CONTROL, START.getBytes()));
+            communicationService.broadcast(START, CONTROL, str -> str.getBytes());
             startTestRun();
         }
     }
 
     public void stop() {
         if (!stopped) {
-            communicationService.broadcast(new ClusterMessage(nodeId, CONTROL, STOP.getBytes()));
+            communicationService.broadcast(STOP, CONTROL, str -> str.getBytes());
             stopTestRun();
         }
     }