blob: f48c4e085c4bebc964bf2cfac3bb25c191714d2f [file] [log] [blame]
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -08001/**
2 * Provides Flow Reconcile service to other modules that need to reconcile
3 * flows.
4 */
5package net.floodlightcontroller.flowcache;
6
7import net.floodlightcontroller.core.module.IFloodlightService;
8import net.floodlightcontroller.devicemanager.IDevice;
9import net.floodlightcontroller.flowcache.IFlowCacheService.FCQueryEvType;
10
11public interface IFlowReconcileService extends IFloodlightService {
12 /**
13 * Add a flow reconcile listener
14 * @param listener The module that can reconcile flows
15 */
16 public void addFlowReconcileListener(IFlowReconcileListener listener);
17
18 /**
19 * Remove a flow reconcile listener
20 * @param listener The module that no longer reconcile flows
21 */
22 public void removeFlowReconcileListener(IFlowReconcileListener listener);
23
24 /**
25 * Remove all flow reconcile listeners
26 */
27 public void clearFlowReconcileListeners();
28
29 /**
30 * Reconcile flow. Returns false if no modified flow-mod need to be
31 * programmed if cluster ID is providced then pnly flows in the given
32 * cluster are reprogrammed
33 *
34 * @param ofmRcIn the ofm rc in
35 */
36 public void reconcileFlow(OFMatchReconcile ofmRcIn);
37
38 /**
39 * Updates the flows to a device after the device moved to a new location
40 * <p>
41 * Queries the flow-cache to get all the flows destined to the given device.
42 * Reconciles each of these flows by potentially reprogramming them to its
43 * new attachment point
44 *
45 * @param device device that has moved
46 * @param handler handler to process the flows
47 * @param fcEvType Event type that triggered the update
48 *
49 */
50 public void updateFlowForDestinationDevice(IDevice device,
51 IFlowQueryHandler handler,
52 FCQueryEvType fcEvType);
53
54 /**
55 * Updates the flows from a device
56 * <p>
57 * Queries the flow-cache to get all the flows source from the given device.
58 * Reconciles each of these flows by potentially reprogramming them to its
59 * new attachment point
60 *
61 * @param device device where the flow originates
62 * @param handler handler to process the flows
63 * @param fcEvType Event type that triggered the update
64 *
65 */
66 public void updateFlowForSourceDevice(IDevice device,
67 IFlowQueryHandler handler,
68 FCQueryEvType fcEvType);
69
70 /**
71 * Generic flow query handler to insert FlowMods into the reconcile pipeline.
72 * @param flowResp
73 */
74 public void flowQueryGenericHandler(FlowCacheQueryResp flowResp);
75}