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