Integrated Kryo serializers with the communications manager and IO loop stuff.
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/messaging/ClusterCommunicationService.java b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/messaging/ClusterCommunicationService.java
index 87ed221..fe7fcd3 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/messaging/ClusterCommunicationService.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/messaging/ClusterCommunicationService.java
@@ -10,6 +10,15 @@
public interface ClusterCommunicationService {
/**
+ * Sends a message to all controller nodes.
+ *
+ * @param message message to send
+ * @return true if the message was sent sucessfully to all nodes; false
+ * if there is no stream or if there was an error for some node
+ */
+ boolean send(ClusterMessage message);
+
+ /**
* Sends a message to the specified controller node.
*
* @param message message to send
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/messaging/GoodbyeMessage.java b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/messaging/GoodbyeMessage.java
new file mode 100644
index 0000000..e9326f3
--- /dev/null
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/messaging/GoodbyeMessage.java
@@ -0,0 +1,37 @@
+package org.onlab.onos.store.cluster.messaging;
+
+import org.onlab.onos.cluster.NodeId;
+
+/**
+ * Goodbye message that nodes use to leave the cluster for good.
+ */
+public class GoodbyeMessage extends ClusterMessage {
+
+ private NodeId nodeId;
+
+ // For serialization
+ private GoodbyeMessage() {
+ super(MessageSubject.GOODBYE);
+ nodeId = null;
+ }
+
+ /**
+ * Creates a new goodbye message.
+ *
+ * @param nodeId sending node identification
+ */
+ public GoodbyeMessage(NodeId nodeId) {
+ super(MessageSubject.HELLO);
+ this.nodeId = nodeId;
+ }
+
+ /**
+ * Returns the sending node identifer.
+ *
+ * @return node identifier
+ */
+ public NodeId nodeId() {
+ return nodeId;
+ }
+
+}
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/messaging/MessageSubject.java b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/messaging/MessageSubject.java
index 3b888b3..bf86c5b 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/messaging/MessageSubject.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/messaging/MessageSubject.java
@@ -8,6 +8,9 @@
/** Represents a first greeting message. */
HELLO,
+ /** Signifies node's intent to leave the cluster. */
+ GOODBYE,
+
/** Signifies a heart-beat message. */
ECHO