blob: 1bcf601e5f55f31cb729eeb3afaf381c99ceff4e [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 Radoslavov9a859022013-10-30 10:08:24 -07007import net.onrc.onos.ofcontroller.flowmanager.IFlowEventHandlerService;
Pavlin Radoslavovaaace7f2013-10-25 19:42:00 -07008import net.onrc.onos.ofcontroller.topology.TopologyElement;
Pavlin Radoslavovb7506842013-10-29 17:46:54 -07009import net.onrc.onos.ofcontroller.util.FlowEntry;
10import net.onrc.onos.ofcontroller.util.FlowEntryId;
Pavlin Radoslavov1308dc62013-10-25 15:54:31 -070011import net.onrc.onos.ofcontroller.util.FlowId;
12import net.onrc.onos.ofcontroller.util.FlowPath;
13
Pavlin Radoslavov1eee2c82013-10-15 02:30:32 -070014/**
15 * Interface for providing Datagrid Service to other modules.
16 */
17public interface IDatagridService extends IFloodlightService {
Pavlin Radoslavov1308dc62013-10-25 15:54:31 -070018 /**
Pavlin Radoslavov9a859022013-10-30 10:08:24 -070019 * Register Flow Event Handler Service for receiving Flow-related
Pavlin Radoslavov6b79f2b2013-10-26 21:31:10 -070020 * notifications.
Pavlin Radoslavov1308dc62013-10-25 15:54:31 -070021 *
Pavlin Radoslavov9a859022013-10-30 10:08:24 -070022 * NOTE: Only a single Flow Event Handler Service can be registered.
Pavlin Radoslavov1308dc62013-10-25 15:54:31 -070023 *
Pavlin Radoslavov9a859022013-10-30 10:08:24 -070024 * @param flowEventHandlerService the Flow Event Handler Service to register.
Pavlin Radoslavov1308dc62013-10-25 15:54:31 -070025 */
Pavlin Radoslavov9a859022013-10-30 10:08:24 -070026 void registerFlowEventHandlerService(IFlowEventHandlerService flowEventHandlerService);
Pavlin Radoslavov1308dc62013-10-25 15:54:31 -070027
28 /**
Pavlin Radoslavov9a859022013-10-30 10:08:24 -070029 * De-register Flow Event Handler Service for receiving Flow-related
Pavlin Radoslavov6b79f2b2013-10-26 21:31:10 -070030 * notifications.
Pavlin Radoslavov1308dc62013-10-25 15:54:31 -070031 *
Pavlin Radoslavov9a859022013-10-30 10:08:24 -070032 * NOTE: Only a single Flow Event Handler Service can be registered.
Pavlin Radoslavov1308dc62013-10-25 15:54:31 -070033 *
Pavlin Radoslavov9a859022013-10-30 10:08:24 -070034 * @param flowEventHandlerService the Flow Event Handler Service to
Pavlin Radoslavov6b79f2b2013-10-26 21:31:10 -070035 * de-register.
Pavlin Radoslavov1308dc62013-10-25 15:54:31 -070036 */
Pavlin Radoslavov9a859022013-10-30 10:08:24 -070037 void deregisterFlowEventHandlerService(IFlowEventHandlerService flowEventHandlerService);
Pavlin Radoslavov1308dc62013-10-25 15:54:31 -070038
39 /**
40 * Get all Flows that are currently in the datagrid.
41 *
42 * @return all Flows that are currently in the datagrid.
43 */
44 Collection<FlowPath> getAllFlows();
45
46 /**
47 * Send a notification that a Flow is added.
48 *
Pavlin Radoslavovb7506842013-10-29 17:46:54 -070049 * @param flowPath the Flow that is added.
Pavlin Radoslavov1308dc62013-10-25 15:54:31 -070050 */
51 void notificationSendFlowAdded(FlowPath flowPath);
52
53 /**
54 * Send a notification that a Flow is removed.
55 *
Pavlin Radoslavovb7506842013-10-29 17:46:54 -070056 * @param flowId the Flow ID of the Flow that is removed.
Pavlin Radoslavov1308dc62013-10-25 15:54:31 -070057 */
58 void notificationSendFlowRemoved(FlowId flowId);
59
60 /**
61 * Send a notification that a Flow is updated.
62 *
Pavlin Radoslavovb7506842013-10-29 17:46:54 -070063 * @param flowPath the Flow that is updated.
Pavlin Radoslavov1308dc62013-10-25 15:54:31 -070064 */
65 void notificationSendFlowUpdated(FlowPath flowPath);
66
67 /**
68 * Send a notification that all Flows are removed.
69 */
70 void notificationSendAllFlowsRemoved();
Pavlin Radoslavovaaace7f2013-10-25 19:42:00 -070071
72 /**
Pavlin Radoslavovb7506842013-10-29 17:46:54 -070073 * Get all Flow Entries that are currently in the datagrid.
74 *
75 * @return all Flow Entries that are currently in the datagrid.
76 */
77 Collection<FlowEntry> getAllFlowEntries();
78
79 /**
80 * Send a notification that a FlowEntry is added.
81 *
82 * @param flowEntry the FlowEntry that is added.
83 */
84 void notificationSendFlowEntryAdded(FlowEntry flowEntry);
85
86 /**
87 * Send a notification that a FlowEntry is removed.
88 *
89 * @param flowEntryId the FlowEntry ID of the FlowEntry that is removed.
90 */
91 void notificationSendFlowEntryRemoved(FlowEntryId flowEntryId);
92
93 /**
94 * Send a notification that a FlowEntry is updated.
95 *
96 * @param flowEntry the FlowEntry that is updated.
97 */
98 void notificationSendFlowEntryUpdated(FlowEntry flowEntry);
99
100 /**
101 * Send a notification that all Flow Entries are removed.
102 */
103 void notificationSendAllFlowEntriesRemoved();
104
105 /**
Pavlin Radoslavovaaace7f2013-10-25 19:42:00 -0700106 * Get all Topology Elements that are currently in the datagrid.
107 *
108 * @return all Topology Elements that are currently in the datagrid.
109 */
110 Collection<TopologyElement> getAllTopologyElements();
111
112 /**
113 * Send a notification that a Topology Element is added.
114 *
115 * @param topologyElement the Topology Element that is added.
116 */
117 void notificationSendTopologyElementAdded(TopologyElement topologyElement);
118
119 /**
120 * Send a notification that a Topology Element is removed.
121 *
122 * @param topologyElement the Topology Element that is removed.
123 */
124 void notificationSendTopologyElementRemoved(TopologyElement topologyElement);
125
126 /**
127 * Send a notification that a Topology Element is updated.
128 *
129 * @param topologyElement the Topology Element that is updated.
130 */
131 void notificationSendTopologyElementUpdated(TopologyElement topologyElement);
132
133 /**
134 * Send a notification that all Topology Elements are removed.
135 */
136 void notificationSendAllTopologyElementsRemoved();
Pavlin Radoslavov1eee2c82013-10-15 02:30:32 -0700137}