blob: 498f58b30449814d73669ab90d96d162d4f8f9df [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;
8import net.onrc.onos.ofcontroller.util.FlowId;
9import net.onrc.onos.ofcontroller.util.FlowPath;
10
Pavlin Radoslavov1eee2c82013-10-15 02:30:32 -070011/**
12 * Interface for providing Datagrid Service to other modules.
13 */
14public interface IDatagridService extends IFloodlightService {
Pavlin Radoslavov1308dc62013-10-25 15:54:31 -070015 /**
16 * Register Flow Service for receiving Flow-related notifications.
17 *
18 * NOTE: Only a single Flow Service can be registered.
19 *
20 * @param flowService the Flow Service to register.
21 */
22 void registerFlowService(IFlowService flowService);
23
24 /**
25 * De-register Flow Service for receiving Flow-related notifications.
26 *
27 * NOTE: Only a single Flow Service can be registered.
28 *
29 * @param flowService the Flow Service to de-register.
30 */
31 void deregisterFlowService(IFlowService flowService);
32
33 /**
34 * Get all Flows that are currently in the datagrid.
35 *
36 * @return all Flows that are currently in the datagrid.
37 */
38 Collection<FlowPath> getAllFlows();
39
40 /**
41 * Send a notification that a Flow is added.
42 *
43 * @param flowPath the flow that is added.
44 */
45 void notificationSendFlowAdded(FlowPath flowPath);
46
47 /**
48 * Send a notification that a Flow is removed.
49 *
50 * @param flowId the Flow ID of the flow that is removed.
51 */
52 void notificationSendFlowRemoved(FlowId flowId);
53
54 /**
55 * Send a notification that a Flow is updated.
56 *
57 * @param flowPath the flow that is updated.
58 */
59 void notificationSendFlowUpdated(FlowPath flowPath);
60
61 /**
62 * Send a notification that all Flows are removed.
63 */
64 void notificationSendAllFlowsRemoved();
Pavlin Radoslavov1eee2c82013-10-15 02:30:32 -070065}