blob: 6fdc9934862c685affdf728ffdc2796e87547e49 [file] [log] [blame]
tombe988312014-09-19 18:38:47 -07001package org.onlab.onos.net.flow;
2
3import org.onlab.onos.net.DeviceId;
4
5/**
6 * Manages inventory of flow rules.
7 */
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 /**
19 * Stores a new flow rule, and generates a FlowRule for it.
20 *
21 * @param rule the flow rule to add
22 * @return a flow entry
23 */
24 FlowRule storeFlowRule(FlowRule rule);
25
26 /**
27 * Stores a new flow rule, or updates an existing entry.
28 *
29 * @param rule the flow rule to add or update
30 * @return flow_added event, or null if just an update
31 */
32 FlowRuleEvent addOrUpdateFlowRule(FlowRule rule);
33
34 /**
35 * @param rule the flow rule to remove
36 * @return flow_removed event, or null if nothing removed
37 */
38 FlowRuleEvent removeFlowRule(FlowRule rule);
39
40}