blob: 68762ac6a2988b6f31d59def1fe3591f7d46bad8 [file] [log] [blame]
tom0eb04ca2014-08-25 14:34:51 -07001package org.onlab.onos.net.flow;
2
alshabib902d41b2014-10-07 16:52:05 -07003import java.util.concurrent.Future;
4
alshabiba68eb962014-09-24 20:34:13 -07005import org.onlab.onos.ApplicationId;
alshabib902d41b2014-10-07 16:52:05 -07006import org.onlab.onos.net.intent.BatchOperation;
tomc1a38d32014-08-25 23:01:32 -07007import org.onlab.onos.net.provider.Provider;
tom0eb04ca2014-08-25 14:34:51 -07008
9/**
10 * Abstraction of a flow rule provider.
11 */
12public interface FlowRuleProvider extends Provider {
tome33cc1a2014-08-25 21:59:41 -070013
alshabibba5ac482014-10-02 17:15:20 -070014 static final int POLL_INTERVAL = 5;
15
tom8bb16062014-09-12 14:47:46 -070016 /**
17 * Instructs the provider to apply the specified flow rules to their
18 * respective devices.
19 * @param flowRules one or more flow rules
20 * throws SomeKindOfException that indicates which ones were applied and
21 * which ones failed
22 */
23 void applyFlowRule(FlowRule... flowRules);
24
alshabib57044ba2014-09-16 15:58:01 -070025 /**
26 * Instructs the provider to remove the specified flow rules to their
27 * respective devices.
28 * @param flowRules one or more flow rules
29 * throws SomeKindOfException that indicates which ones were applied and
30 * which ones failed
31 */
32 void removeFlowRule(FlowRule... flowRules);
33
alshabiba68eb962014-09-24 20:34:13 -070034 /**
35 * Removes rules by their id.
36 * @param id the id to remove
37 */
38 void removeRulesById(ApplicationId id, FlowRule... flowRules);
39
alshabib902d41b2014-10-07 16:52:05 -070040 Future<Void> executeBatch(BatchOperation<FlowRuleBatchEntry> batch);
41
tom0eb04ca2014-08-25 14:34:51 -070042}