Renamed *Instance to *Node for better readability and to avoid conflict with notion of Karaf instance.
Added cluster service and trivial store implementations.
diff --git a/core/api/src/main/java/org/onlab/onos/cluster/NodeId.java b/core/api/src/main/java/org/onlab/onos/cluster/NodeId.java
new file mode 100644
index 0000000..2430d52
--- /dev/null
+++ b/core/api/src/main/java/org/onlab/onos/cluster/NodeId.java
@@ -0,0 +1,48 @@
+package org.onlab.onos.cluster;
+
+import java.util.Objects;
+
+/**
+ * Controller cluster identity.
+ */
+public class NodeId {
+
+ private final String id;
+
+ // Default constructor for serialization
+ protected NodeId() {
+ id = null;
+ }
+
+ /**
+ * Creates a new cluster node identifier from the specified string.
+ *
+ * @param id string identifier
+ */
+ public NodeId(String id) {
+ this.id = id;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj instanceof NodeId) {
+ final NodeId other = (NodeId) obj;
+ return Objects.equals(this.id, other.id);
+ }
+ return false;
+ }
+
+ @Override
+ public String toString() {
+ return id;
+ }
+
+}