Added notion of a general Store abstraction and wired it up in ClusterStore.
diff --git a/core/api/src/main/java/org/onlab/onos/store/AbstractStore.java b/core/api/src/main/java/org/onlab/onos/store/AbstractStore.java
new file mode 100644
index 0000000..efd0d03
--- /dev/null
+++ b/core/api/src/main/java/org/onlab/onos/store/AbstractStore.java
@@ -0,0 +1,33 @@
+package org.onlab.onos.store;
+
+import org.onlab.onos.event.Event;
+
+/**
+ * Base implementation of a store.
+ */
+public class AbstractStore<E extends Event, D extends StoreDelegate<E>>
+ implements Store<E, D> {
+
+ protected D delegate;
+
+ @Override
+ public void setDelegate(D delegate) {
+ this.delegate = delegate;
+ }
+
+ @Override
+ public D getDelegate() {
+ return delegate;
+ }
+
+ /**
+ * Notifies the delegate with the specified event.
+ *
+ * @param event event to delegate
+ */
+ protected void notifyDelegate(E event) {
+ if (delegate != null) {
+ delegate.notify(event);
+ }
+ }
+}
diff --git a/core/api/src/main/java/org/onlab/onos/store/Store.java b/core/api/src/main/java/org/onlab/onos/store/Store.java
new file mode 100644
index 0000000..9eaef66
--- /dev/null
+++ b/core/api/src/main/java/org/onlab/onos/store/Store.java
@@ -0,0 +1,25 @@
+package org.onlab.onos.store;
+
+import org.onlab.onos.event.Event;
+
+/**
+ * Abstraction of a entity capable of storing and/or distributing information
+ * across a cluster.
+ */
+public interface Store<E extends Event, D extends StoreDelegate<E>> {
+
+ /**
+ * Sets the delegate on the store.
+ *
+ * @param delegate new store delegate
+ */
+ void setDelegate(D delegate);
+
+ /**
+ * Get the current store delegate.
+ *
+ * @return store delegate
+ */
+ D getDelegate();
+
+}
diff --git a/core/api/src/main/java/org/onlab/onos/store/StoreDelegate.java b/core/api/src/main/java/org/onlab/onos/store/StoreDelegate.java
new file mode 100644
index 0000000..e2c5cd3
--- /dev/null
+++ b/core/api/src/main/java/org/onlab/onos/store/StoreDelegate.java
@@ -0,0 +1,13 @@
+package org.onlab.onos.store;
+
+import org.onlab.onos.event.Event;
+
+/**
+ * Entity associated with a store and capable of receiving notifications of
+ * events within the store.
+ */
+public interface StoreDelegate<E extends Event> {
+
+ void notify(E event);
+
+}
diff --git a/core/api/src/main/java/org/onlab/onos/store/package-info.java b/core/api/src/main/java/org/onlab/onos/store/package-info.java
new file mode 100644
index 0000000..7e767f0
--- /dev/null
+++ b/core/api/src/main/java/org/onlab/onos/store/package-info.java
@@ -0,0 +1,4 @@
+/**
+ * Abstractions for creating and interacting with distributed stores.
+ */
+package org.onlab.onos.store;
\ No newline at end of file