blob: bf8e41f2ed6f067c5e1e0927a530230821fe84ab [file] [log] [blame]
Pavlin Radoslavov1eee2c82013-10-15 02:30:32 -07001package net.onrc.onos.datagrid;
2
Pavlin Radoslavov1308dc62013-10-25 15:54:31 -07003import java.util.Collection;
4
Pavlin Radoslavov1eee2c82013-10-15 02:30:32 -07005import net.floodlightcontroller.core.module.IFloodlightService;
6
Pavlin Radoslavov1308dc62013-10-25 15:54:31 -07007import net.onrc.onos.ofcontroller.flowmanager.IFlowService;
Pavlin Radoslavovaaace7f2013-10-25 19:42:00 -07008import net.onrc.onos.ofcontroller.topology.TopologyElement;
Pavlin Radoslavov1308dc62013-10-25 15:54:31 -07009import net.onrc.onos.ofcontroller.util.FlowId;
10import net.onrc.onos.ofcontroller.util.FlowPath;
11
Pavlin Radoslavov1eee2c82013-10-15 02:30:32 -070012/**
13 * Interface for providing Datagrid Service to other modules.
14 */
15public interface IDatagridService extends IFloodlightService {
Pavlin Radoslavov1308dc62013-10-25 15:54:31 -070016 /**
17 * Register Flow Service for receiving Flow-related notifications.
18 *
19 * NOTE: Only a single Flow Service can be registered.
20 *
21 * @param flowService the Flow Service to register.
22 */
23 void registerFlowService(IFlowService flowService);
24
25 /**
26 * De-register Flow Service for receiving Flow-related notifications.
27 *
28 * NOTE: Only a single Flow Service can be registered.
29 *
30 * @param flowService the Flow Service to de-register.
31 */
32 void deregisterFlowService(IFlowService flowService);
33
34 /**
35 * Get all Flows that are currently in the datagrid.
36 *
37 * @return all Flows that are currently in the datagrid.
38 */
39 Collection<FlowPath> getAllFlows();
40
41 /**
42 * Send a notification that a Flow is added.
43 *
44 * @param flowPath the flow that is added.
45 */
46 void notificationSendFlowAdded(FlowPath flowPath);
47
48 /**
49 * Send a notification that a Flow is removed.
50 *
51 * @param flowId the Flow ID of the flow that is removed.
52 */
53 void notificationSendFlowRemoved(FlowId flowId);
54
55 /**
56 * Send a notification that a Flow is updated.
57 *
58 * @param flowPath the flow that is updated.
59 */
60 void notificationSendFlowUpdated(FlowPath flowPath);
61
62 /**
63 * Send a notification that all Flows are removed.
64 */
65 void notificationSendAllFlowsRemoved();
Pavlin Radoslavovaaace7f2013-10-25 19:42:00 -070066
67 /**
68 * Get all Topology Elements that are currently in the datagrid.
69 *
70 * @return all Topology Elements that are currently in the datagrid.
71 */
72 Collection<TopologyElement> getAllTopologyElements();
73
74 /**
75 * Send a notification that a Topology Element is added.
76 *
77 * @param topologyElement the Topology Element that is added.
78 */
79 void notificationSendTopologyElementAdded(TopologyElement topologyElement);
80
81 /**
82 * Send a notification that a Topology Element is removed.
83 *
84 * @param topologyElement the Topology Element that is removed.
85 */
86 void notificationSendTopologyElementRemoved(TopologyElement topologyElement);
87
88 /**
89 * Send a notification that a Topology Element is updated.
90 *
91 * @param topologyElement the Topology Element that is updated.
92 */
93 void notificationSendTopologyElementUpdated(TopologyElement topologyElement);
94
95 /**
96 * Send a notification that all Topology Elements are removed.
97 */
98 void notificationSendAllTopologyElementsRemoved();
Pavlin Radoslavov1eee2c82013-10-15 02:30:32 -070099}