blob: 10cd1e47968cb0d1afe5bcc500fd449bd6d74090 [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 Radoslavov6b79f2b2013-10-26 21:31:10 -07007import net.onrc.onos.ofcontroller.flowmanager.IPathComputationService;
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 /**
Pavlin Radoslavov6b79f2b2013-10-26 21:31:10 -070017 * Register Path Computation Service for receiving Flow-related
18 * notifications.
Pavlin Radoslavov1308dc62013-10-25 15:54:31 -070019 *
Pavlin Radoslavov6b79f2b2013-10-26 21:31:10 -070020 * NOTE: Only a single Path Computation Service can be registered.
Pavlin Radoslavov1308dc62013-10-25 15:54:31 -070021 *
Pavlin Radoslavov6b79f2b2013-10-26 21:31:10 -070022 * @param pathComputationService the Path Computation Service to register.
Pavlin Radoslavov1308dc62013-10-25 15:54:31 -070023 */
Pavlin Radoslavov6b79f2b2013-10-26 21:31:10 -070024 void registerPathComputationService(IPathComputationService pathComputationService);
Pavlin Radoslavov1308dc62013-10-25 15:54:31 -070025
26 /**
Pavlin Radoslavov6b79f2b2013-10-26 21:31:10 -070027 * De-register Path Computation Service for receiving Flow-related
28 * notifications.
Pavlin Radoslavov1308dc62013-10-25 15:54:31 -070029 *
Pavlin Radoslavov6b79f2b2013-10-26 21:31:10 -070030 * NOTE: Only a single Path Computation Service can be registered.
Pavlin Radoslavov1308dc62013-10-25 15:54:31 -070031 *
Pavlin Radoslavov6b79f2b2013-10-26 21:31:10 -070032 * @param pathComputationService the Path Computation Service to
33 * de-register.
Pavlin Radoslavov1308dc62013-10-25 15:54:31 -070034 */
Pavlin Radoslavov6b79f2b2013-10-26 21:31:10 -070035 void deregisterPathComputationService(IPathComputationService pathComputationService);
Pavlin Radoslavov1308dc62013-10-25 15:54:31 -070036
37 /**
38 * Get all Flows that are currently in the datagrid.
39 *
40 * @return all Flows that are currently in the datagrid.
41 */
42 Collection<FlowPath> getAllFlows();
43
44 /**
45 * Send a notification that a Flow is added.
46 *
47 * @param flowPath the flow that is added.
48 */
49 void notificationSendFlowAdded(FlowPath flowPath);
50
51 /**
52 * Send a notification that a Flow is removed.
53 *
54 * @param flowId the Flow ID of the flow that is removed.
55 */
56 void notificationSendFlowRemoved(FlowId flowId);
57
58 /**
59 * Send a notification that a Flow is updated.
60 *
61 * @param flowPath the flow that is updated.
62 */
63 void notificationSendFlowUpdated(FlowPath flowPath);
64
65 /**
66 * Send a notification that all Flows are removed.
67 */
68 void notificationSendAllFlowsRemoved();
Pavlin Radoslavovaaace7f2013-10-25 19:42:00 -070069
70 /**
71 * Get all Topology Elements that are currently in the datagrid.
72 *
73 * @return all Topology Elements that are currently in the datagrid.
74 */
75 Collection<TopologyElement> getAllTopologyElements();
76
77 /**
78 * Send a notification that a Topology Element is added.
79 *
80 * @param topologyElement the Topology Element that is added.
81 */
82 void notificationSendTopologyElementAdded(TopologyElement topologyElement);
83
84 /**
85 * Send a notification that a Topology Element is removed.
86 *
87 * @param topologyElement the Topology Element that is removed.
88 */
89 void notificationSendTopologyElementRemoved(TopologyElement topologyElement);
90
91 /**
92 * Send a notification that a Topology Element is updated.
93 *
94 * @param topologyElement the Topology Element that is updated.
95 */
96 void notificationSendTopologyElementUpdated(TopologyElement topologyElement);
97
98 /**
99 * Send a notification that all Topology Elements are removed.
100 */
101 void notificationSendAllTopologyElementsRemoved();
Pavlin Radoslavov1eee2c82013-10-15 02:30:32 -0700102}