Pavlin Radoslavov | 1eee2c8 | 2013-10-15 02:30:32 -0700 | [diff] [blame] | 1 | package net.onrc.onos.datagrid; |
| 2 | |
Pavlin Radoslavov | 1308dc6 | 2013-10-25 15:54:31 -0700 | [diff] [blame] | 3 | import java.util.Collection; |
| 4 | |
Pavlin Radoslavov | 1eee2c8 | 2013-10-15 02:30:32 -0700 | [diff] [blame] | 5 | import net.floodlightcontroller.core.module.IFloodlightService; |
| 6 | |
Pavlin Radoslavov | 6b79f2b | 2013-10-26 21:31:10 -0700 | [diff] [blame] | 7 | import net.onrc.onos.ofcontroller.flowmanager.IPathComputationService; |
Pavlin Radoslavov | aaace7f | 2013-10-25 19:42:00 -0700 | [diff] [blame] | 8 | import net.onrc.onos.ofcontroller.topology.TopologyElement; |
Pavlin Radoslavov | 1308dc6 | 2013-10-25 15:54:31 -0700 | [diff] [blame] | 9 | import net.onrc.onos.ofcontroller.util.FlowId; |
| 10 | import net.onrc.onos.ofcontroller.util.FlowPath; |
| 11 | |
Pavlin Radoslavov | 1eee2c8 | 2013-10-15 02:30:32 -0700 | [diff] [blame] | 12 | /** |
| 13 | * Interface for providing Datagrid Service to other modules. |
| 14 | */ |
| 15 | public interface IDatagridService extends IFloodlightService { |
Pavlin Radoslavov | 1308dc6 | 2013-10-25 15:54:31 -0700 | [diff] [blame] | 16 | /** |
Pavlin Radoslavov | 6b79f2b | 2013-10-26 21:31:10 -0700 | [diff] [blame] | 17 | * Register Path Computation Service for receiving Flow-related |
| 18 | * notifications. |
Pavlin Radoslavov | 1308dc6 | 2013-10-25 15:54:31 -0700 | [diff] [blame] | 19 | * |
Pavlin Radoslavov | 6b79f2b | 2013-10-26 21:31:10 -0700 | [diff] [blame] | 20 | * NOTE: Only a single Path Computation Service can be registered. |
Pavlin Radoslavov | 1308dc6 | 2013-10-25 15:54:31 -0700 | [diff] [blame] | 21 | * |
Pavlin Radoslavov | 6b79f2b | 2013-10-26 21:31:10 -0700 | [diff] [blame] | 22 | * @param pathComputationService the Path Computation Service to register. |
Pavlin Radoslavov | 1308dc6 | 2013-10-25 15:54:31 -0700 | [diff] [blame] | 23 | */ |
Pavlin Radoslavov | 6b79f2b | 2013-10-26 21:31:10 -0700 | [diff] [blame] | 24 | void registerPathComputationService(IPathComputationService pathComputationService); |
Pavlin Radoslavov | 1308dc6 | 2013-10-25 15:54:31 -0700 | [diff] [blame] | 25 | |
| 26 | /** |
Pavlin Radoslavov | 6b79f2b | 2013-10-26 21:31:10 -0700 | [diff] [blame] | 27 | * De-register Path Computation Service for receiving Flow-related |
| 28 | * notifications. |
Pavlin Radoslavov | 1308dc6 | 2013-10-25 15:54:31 -0700 | [diff] [blame] | 29 | * |
Pavlin Radoslavov | 6b79f2b | 2013-10-26 21:31:10 -0700 | [diff] [blame] | 30 | * NOTE: Only a single Path Computation Service can be registered. |
Pavlin Radoslavov | 1308dc6 | 2013-10-25 15:54:31 -0700 | [diff] [blame] | 31 | * |
Pavlin Radoslavov | 6b79f2b | 2013-10-26 21:31:10 -0700 | [diff] [blame] | 32 | * @param pathComputationService the Path Computation Service to |
| 33 | * de-register. |
Pavlin Radoslavov | 1308dc6 | 2013-10-25 15:54:31 -0700 | [diff] [blame] | 34 | */ |
Pavlin Radoslavov | 6b79f2b | 2013-10-26 21:31:10 -0700 | [diff] [blame] | 35 | void deregisterPathComputationService(IPathComputationService pathComputationService); |
Pavlin Radoslavov | 1308dc6 | 2013-10-25 15:54:31 -0700 | [diff] [blame] | 36 | |
| 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 Radoslavov | aaace7f | 2013-10-25 19:42:00 -0700 | [diff] [blame] | 69 | |
| 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 Radoslavov | 1eee2c8 | 2013-10-15 02:30:32 -0700 | [diff] [blame] | 102 | } |