Renamed datagrid and datastore packages
net.onrc.onos.datagrid.* => net.onrc.onos.core.datagrid.*
net.onrc.onos.datastore.* => net.onrc.onos.core.datastore.*
Change-Id: Ibe1894a6fabae08ea7cfcbf6595f0c91b05ef497
diff --git a/src/main/java/net/onrc/onos/core/datagrid/IEventChannel.java b/src/main/java/net/onrc/onos/core/datagrid/IEventChannel.java
new file mode 100644
index 0000000..5874b31
--- /dev/null
+++ b/src/main/java/net/onrc/onos/core/datagrid/IEventChannel.java
@@ -0,0 +1,98 @@
+package net.onrc.onos.core.datagrid;
+
+import java.util.Collection;
+
+/**
+ * Event Channel Interface.
+ */
+public interface IEventChannel<K, V> {
+ /**
+ * Startup the channel operation.
+ */
+ void startup();
+
+ /**
+ * Shutdown the channel operation.
+ */
+ void shutdown();
+
+ /**
+ * Verify the key and value types of a channel.
+ *
+ * @param typeK the type of the key to verify.
+ * @param typeV the type of the value to verify.
+ * @return true if the key and value types of the channel match,
+ * otherwise false.
+ */
+ boolean verifyKeyValueTypes(Class typeK, Class typeV);
+
+ /**
+ * Add event channel listener.
+ *
+ * @param listener the listener to add.
+ */
+ void addListener(IEventChannelListener<K, V> listener);
+
+ /**
+ * Remove event channel listener.
+ *
+ * @param listener the listener to remove.
+ */
+ void removeListener(IEventChannelListener<K, V> listener);
+
+ /**
+ * Add an entry to the channel.
+ *
+ * @param key the key of the entry to add.
+ * @param value the value of the entry to add.
+ */
+ void addEntry(K key, V value);
+
+ /**
+ * Add a transient entry to the channel.
+ * <p/>
+ * The added entry is transient and will automatically timeout after 1ms.
+ *
+ * @param key the key of the entry to add.
+ * @param value the value of the entry to add.
+ */
+ void addTransientEntry(K key, V value);
+
+ /**
+ * Remove an entry from the channel.
+ *
+ * @param key the key of the entry to remove.
+ */
+ void removeEntry(K key);
+
+ /**
+ * Update an entry in the channel.
+ *
+ * @param key the key of the entry to update.
+ * @param value the value of the entry to update.
+ */
+ void updateEntry(K key, V value);
+
+ /**
+ * Get an entry from the channel.
+ *
+ * @param key the key of the entry to get.
+ * @return the entry if found, otherwise null.
+ */
+ @Deprecated
+ V getEntry(K key);
+
+ /**
+ * Get all entries in the channel.
+ *
+ * @return all entries that are currently in the channel.
+ */
+ @Deprecated
+ Collection<V> getAllEntries();
+
+ /**
+ * Remove all entries in the channel.
+ */
+ @Deprecated
+ void removeAllEntries();
+}