Showing
3 changed files
with
0 additions
and
36 deletions
| ... | @@ -20,7 +20,6 @@ package org.onlab.onos.net.flow; | ... | @@ -20,7 +20,6 @@ package org.onlab.onos.net.flow; |
| 20 | 20 | ||
| 21 | import java.util.concurrent.Future; | 21 | import java.util.concurrent.Future; |
| 22 | 22 | ||
| 23 | -import org.onlab.onos.ApplicationId; | ||
| 24 | import org.onlab.onos.net.DeviceId; | 23 | import org.onlab.onos.net.DeviceId; |
| 25 | import org.onlab.onos.store.Store; | 24 | import org.onlab.onos.store.Store; |
| 26 | 25 | ||
| ... | @@ -53,14 +52,6 @@ public interface FlowRuleStore extends Store<FlowRuleBatchEvent, FlowRuleStoreDe | ... | @@ -53,14 +52,6 @@ public interface FlowRuleStore extends Store<FlowRuleBatchEvent, FlowRuleStoreDe |
| 53 | Iterable<FlowEntry> getFlowEntries(DeviceId deviceId); | 52 | Iterable<FlowEntry> getFlowEntries(DeviceId deviceId); |
| 54 | 53 | ||
| 55 | /** | 54 | /** |
| 56 | - * Returns the flow entries associated with an application. | ||
| 57 | - * | ||
| 58 | - * @param appId the application id | ||
| 59 | - * @return the flow entries | ||
| 60 | - */ | ||
| 61 | - Iterable<FlowRule> getFlowRulesByAppId(ApplicationId appId); | ||
| 62 | - | ||
| 63 | - /** | ||
| 64 | // TODO: Better description of method behavior. | 55 | // TODO: Better description of method behavior. |
| 65 | * Stores a new flow rule without generating events. | 56 | * Stores a new flow rule without generating events. |
| 66 | * | 57 | * | ... | ... |
| ... | @@ -26,7 +26,6 @@ import org.apache.felix.scr.annotations.Deactivate; | ... | @@ -26,7 +26,6 @@ import org.apache.felix.scr.annotations.Deactivate; |
| 26 | import org.apache.felix.scr.annotations.Reference; | 26 | import org.apache.felix.scr.annotations.Reference; |
| 27 | import org.apache.felix.scr.annotations.ReferenceCardinality; | 27 | import org.apache.felix.scr.annotations.ReferenceCardinality; |
| 28 | import org.apache.felix.scr.annotations.Service; | 28 | import org.apache.felix.scr.annotations.Service; |
| 29 | -import org.onlab.onos.ApplicationId; | ||
| 30 | import org.onlab.onos.cluster.ClusterService; | 29 | import org.onlab.onos.cluster.ClusterService; |
| 31 | import org.onlab.onos.net.Device; | 30 | import org.onlab.onos.net.Device; |
| 32 | import org.onlab.onos.net.DeviceId; | 31 | import org.onlab.onos.net.DeviceId; |
| ... | @@ -265,15 +264,6 @@ public class DistributedFlowRuleStore | ... | @@ -265,15 +264,6 @@ public class DistributedFlowRuleStore |
| 265 | } | 264 | } |
| 266 | 265 | ||
| 267 | @Override | 266 | @Override |
| 268 | - public synchronized Iterable<FlowRule> getFlowRulesByAppId(ApplicationId appId) { | ||
| 269 | - Collection<FlowRule> rules = flowEntriesById.get(appId.id()); | ||
| 270 | - if (rules == null) { | ||
| 271 | - return Collections.emptyList(); | ||
| 272 | - } | ||
| 273 | - return ImmutableSet.copyOf(rules); | ||
| 274 | - } | ||
| 275 | - | ||
| 276 | - @Override | ||
| 277 | public void storeFlowRule(FlowRule rule) { | 267 | public void storeFlowRule(FlowRule rule) { |
| 278 | storeBatch(new FlowRuleBatchOperation(Arrays.asList(new FlowRuleBatchEntry(FlowRuleOperation.ADD, rule)))); | 268 | storeBatch(new FlowRuleBatchOperation(Arrays.asList(new FlowRuleBatchEntry(FlowRuleOperation.ADD, rule)))); |
| 279 | } | 269 | } | ... | ... |
| ... | @@ -7,7 +7,6 @@ import org.apache.felix.scr.annotations.Activate; | ... | @@ -7,7 +7,6 @@ import org.apache.felix.scr.annotations.Activate; |
| 7 | import org.apache.felix.scr.annotations.Component; | 7 | import org.apache.felix.scr.annotations.Component; |
| 8 | import org.apache.felix.scr.annotations.Deactivate; | 8 | import org.apache.felix.scr.annotations.Deactivate; |
| 9 | import org.apache.felix.scr.annotations.Service; | 9 | import org.apache.felix.scr.annotations.Service; |
| 10 | -import org.onlab.onos.ApplicationId; | ||
| 11 | import org.onlab.onos.net.DeviceId; | 10 | import org.onlab.onos.net.DeviceId; |
| 12 | import org.onlab.onos.net.flow.CompletedBatchOperation; | 11 | import org.onlab.onos.net.flow.CompletedBatchOperation; |
| 13 | import org.onlab.onos.net.flow.DefaultFlowEntry; | 12 | import org.onlab.onos.net.flow.DefaultFlowEntry; |
| ... | @@ -31,9 +30,7 @@ import org.slf4j.Logger; | ... | @@ -31,9 +30,7 @@ import org.slf4j.Logger; |
| 31 | 30 | ||
| 32 | import java.util.Arrays; | 31 | import java.util.Arrays; |
| 33 | import java.util.Collections; | 32 | import java.util.Collections; |
| 34 | -import java.util.HashSet; | ||
| 35 | import java.util.List; | 33 | import java.util.List; |
| 36 | -import java.util.Set; | ||
| 37 | import java.util.concurrent.ConcurrentHashMap; | 34 | import java.util.concurrent.ConcurrentHashMap; |
| 38 | import java.util.concurrent.ConcurrentMap; | 35 | import java.util.concurrent.ConcurrentMap; |
| 39 | import java.util.concurrent.CopyOnWriteArrayList; | 36 | import java.util.concurrent.CopyOnWriteArrayList; |
| ... | @@ -143,20 +140,6 @@ public class SimpleFlowRuleStore | ... | @@ -143,20 +140,6 @@ public class SimpleFlowRuleStore |
| 143 | } | 140 | } |
| 144 | 141 | ||
| 145 | @Override | 142 | @Override |
| 146 | - public Iterable<FlowRule> getFlowRulesByAppId(ApplicationId appId) { | ||
| 147 | - | ||
| 148 | - Set<FlowRule> rules = new HashSet<>(); | ||
| 149 | - for (DeviceId did : flowEntries.keySet()) { | ||
| 150 | - for (FlowEntry fe : getFlowEntries(did)) { | ||
| 151 | - if (fe.appId() == appId.id()) { | ||
| 152 | - rules.add(fe); | ||
| 153 | - } | ||
| 154 | - } | ||
| 155 | - } | ||
| 156 | - return rules; | ||
| 157 | - } | ||
| 158 | - | ||
| 159 | - @Override | ||
| 160 | public void storeFlowRule(FlowRule rule) { | 143 | public void storeFlowRule(FlowRule rule) { |
| 161 | storeFlowRuleInternal(rule); | 144 | storeFlowRuleInternal(rule); |
| 162 | } | 145 | } | ... | ... |
-
Please register or login to post a comment