Use the Executor interface when specifying where to handle incoming messages
This is done so that one can simply specify a direct executor.
Change-Id: I1c3ea977dd7c2d604588d587fd67f7012355eedf
diff --git a/core/store/dist/src/main/java/org/onosproject/store/cluster/messaging/impl/ClusterCommunicationManager.java b/core/store/dist/src/main/java/org/onosproject/store/cluster/messaging/impl/ClusterCommunicationManager.java
index 204e0fd..e479d55 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/cluster/messaging/impl/ClusterCommunicationManager.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/cluster/messaging/impl/ClusterCommunicationManager.java
@@ -43,6 +43,7 @@
 import java.io.IOException;
 import java.util.Set;
 import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.Executor;
 import java.util.concurrent.ExecutorService;
 import java.util.function.Consumer;
 import java.util.function.Function;
@@ -270,7 +271,7 @@
             Function<byte[], M> decoder,
             Function<M, R> handler,
             Function<R, byte[]> encoder,
-            ExecutorService executor) {
+            Executor executor) {
         messagingService.registerHandler(subject.value(),
                 new InternalMessageResponder<>(decoder, encoder, handler),
                 executor);
@@ -280,7 +281,7 @@
     public <M> void addSubscriber(MessageSubject subject,
             Function<byte[], M> decoder,
             Consumer<M> handler,
-            ExecutorService executor) {
+            Executor executor) {
         messagingService.registerHandler(subject.value(),
                 new InternalMessageConsumer<>(decoder, handler),
                 executor);