Added the mechanism between the FlowManager and the Hazelcast datagrid
to send/receive Flow-related state.
diff --git a/src/main/java/net/onrc/onos/datagrid/IDatagridService.java b/src/main/java/net/onrc/onos/datagrid/IDatagridService.java
index 1c7f3ab..498f58b 100644
--- a/src/main/java/net/onrc/onos/datagrid/IDatagridService.java
+++ b/src/main/java/net/onrc/onos/datagrid/IDatagridService.java
@@ -1,10 +1,65 @@
package net.onrc.onos.datagrid;
+import java.util.Collection;
+
import net.floodlightcontroller.core.module.IFloodlightService;
+import net.onrc.onos.ofcontroller.flowmanager.IFlowService;
+import net.onrc.onos.ofcontroller.util.FlowId;
+import net.onrc.onos.ofcontroller.util.FlowPath;
+
/**
* Interface for providing Datagrid Service to other modules.
*/
public interface IDatagridService extends IFloodlightService {
- // TODO
+ /**
+ * Register Flow Service for receiving Flow-related notifications.
+ *
+ * NOTE: Only a single Flow Service can be registered.
+ *
+ * @param flowService the Flow Service to register.
+ */
+ void registerFlowService(IFlowService flowService);
+
+ /**
+ * De-register Flow Service for receiving Flow-related notifications.
+ *
+ * NOTE: Only a single Flow Service can be registered.
+ *
+ * @param flowService the Flow Service to de-register.
+ */
+ void deregisterFlowService(IFlowService flowService);
+
+ /**
+ * Get all Flows that are currently in the datagrid.
+ *
+ * @return all Flows that are currently in the datagrid.
+ */
+ Collection<FlowPath> getAllFlows();
+
+ /**
+ * Send a notification that a Flow is added.
+ *
+ * @param flowPath the flow that is added.
+ */
+ void notificationSendFlowAdded(FlowPath flowPath);
+
+ /**
+ * Send a notification that a Flow is removed.
+ *
+ * @param flowId the Flow ID of the flow that is removed.
+ */
+ void notificationSendFlowRemoved(FlowId flowId);
+
+ /**
+ * Send a notification that a Flow is updated.
+ *
+ * @param flowPath the flow that is updated.
+ */
+ void notificationSendFlowUpdated(FlowPath flowPath);
+
+ /**
+ * Send a notification that all Flows are removed.
+ */
+ void notificationSendAllFlowsRemoved();
}