blob: f00b5956b444550030417f3e41f0b1946fe5bead [file] [log] [blame]
tombe988312014-09-19 18:38:47 -07001package org.onlab.onos.net.flow;
2
3import org.onlab.onos.net.DeviceId;
4
5/**
tome4729872014-09-23 00:37:37 -07006 * Manages inventory of flow rules; not intended for direct use.
tombe988312014-09-19 18:38:47 -07007 */
8public interface FlowRuleStore {
9
10 /**
11 * Returns the flow entries associated with a device.
12 *
13 * @param deviceId the device ID
14 * @return the flow entries
15 */
16 Iterable<FlowRule> getFlowEntries(DeviceId deviceId);
17
18 /**
alshabib219ebaa2014-09-22 15:41:24 -070019 * Stores a new flow rule without generating events.
tombe988312014-09-19 18:38:47 -070020 *
21 * @param rule the flow rule to add
tombe988312014-09-19 18:38:47 -070022 */
alshabib219ebaa2014-09-22 15:41:24 -070023 void storeFlowRule(FlowRule rule);
24
25 /**
26 * Deletes a flow rule without generating events.
27 *
28 * @param rule the flow rule to delete
29 */
30 void deleteFlowRule(FlowRule rule);
tombe988312014-09-19 18:38:47 -070031
32 /**
33 * Stores a new flow rule, or updates an existing entry.
34 *
35 * @param rule the flow rule to add or update
36 * @return flow_added event, or null if just an update
37 */
38 FlowRuleEvent addOrUpdateFlowRule(FlowRule rule);
39
40 /**
41 * @param rule the flow rule to remove
42 * @return flow_removed event, or null if nothing removed
43 */
44 FlowRuleEvent removeFlowRule(FlowRule rule);
45
46}