Showing
2 changed files
with
21 additions
and
20 deletions
... | @@ -76,7 +76,8 @@ public class FlowRuleManager | ... | @@ -76,7 +76,8 @@ public class FlowRuleManager |
76 | 76 | ||
77 | private final FlowRuleStoreDelegate delegate = new InternalStoreDelegate(); | 77 | private final FlowRuleStoreDelegate delegate = new InternalStoreDelegate(); |
78 | 78 | ||
79 | - private final ExecutorService futureListeners = Executors.newCachedThreadPool(namedThreads("provider-future-listeners")); | 79 | + private final ExecutorService futureListeners = |
80 | + Executors.newCachedThreadPool(namedThreads("provider-future-listeners")); | ||
80 | 81 | ||
81 | @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) | 82 | @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) |
82 | protected FlowRuleStore store; | 83 | protected FlowRuleStore store; |
... | @@ -404,7 +405,8 @@ public class FlowRuleManager | ... | @@ -404,7 +405,8 @@ public class FlowRuleManager |
404 | result.addListener(new Runnable() { | 405 | result.addListener(new Runnable() { |
405 | @Override | 406 | @Override |
406 | public void run() { | 407 | public void run() { |
407 | - store.batchOperationComplete(FlowRuleBatchEvent.completed(request, Futures.getUnchecked(result))); | 408 | + store.batchOperationComplete(FlowRuleBatchEvent.completed(request, |
409 | + Futures.getUnchecked(result))); | ||
408 | } | 410 | } |
409 | }, futureListeners); | 411 | }, futureListeners); |
410 | 412 | ... | ... |
1 | package org.onlab.onos.store.trivial.impl; | 1 | package org.onlab.onos.store.trivial.impl; |
2 | 2 | ||
3 | -import static org.onlab.onos.net.flow.FlowRuleEvent.Type.RULE_REMOVED; | 3 | +import com.google.common.base.Function; |
4 | -import static org.slf4j.LoggerFactory.getLogger; | 4 | +import com.google.common.collect.FluentIterable; |
5 | -import static org.apache.commons.lang3.concurrent.ConcurrentUtils.createIfAbsentUnchecked; | 5 | +import com.google.common.util.concurrent.Futures; |
6 | - | ||
7 | -import java.util.Arrays; | ||
8 | -import java.util.Collections; | ||
9 | -import java.util.HashSet; | ||
10 | -import java.util.List; | ||
11 | -import java.util.Set; | ||
12 | -import java.util.concurrent.ConcurrentHashMap; | ||
13 | -import java.util.concurrent.ConcurrentMap; | ||
14 | -import java.util.concurrent.CopyOnWriteArrayList; | ||
15 | -import java.util.concurrent.Future; | ||
16 | - | ||
17 | import org.apache.felix.scr.annotations.Activate; | 6 | import org.apache.felix.scr.annotations.Activate; |
18 | import org.apache.felix.scr.annotations.Component; | 7 | import org.apache.felix.scr.annotations.Component; |
19 | import org.apache.felix.scr.annotations.Deactivate; | 8 | import org.apache.felix.scr.annotations.Deactivate; |
... | @@ -40,9 +29,19 @@ import org.onlab.onos.store.AbstractStore; | ... | @@ -40,9 +29,19 @@ import org.onlab.onos.store.AbstractStore; |
40 | import org.onlab.util.NewConcurrentHashMap; | 29 | import org.onlab.util.NewConcurrentHashMap; |
41 | import org.slf4j.Logger; | 30 | import org.slf4j.Logger; |
42 | 31 | ||
43 | -import com.google.common.base.Function; | 32 | +import java.util.Arrays; |
44 | -import com.google.common.collect.FluentIterable; | 33 | +import java.util.Collections; |
45 | -import com.google.common.util.concurrent.Futures; | 34 | +import java.util.HashSet; |
35 | +import java.util.List; | ||
36 | +import java.util.Set; | ||
37 | +import java.util.concurrent.ConcurrentHashMap; | ||
38 | +import java.util.concurrent.ConcurrentMap; | ||
39 | +import java.util.concurrent.CopyOnWriteArrayList; | ||
40 | +import java.util.concurrent.Future; | ||
41 | + | ||
42 | +import static org.apache.commons.lang3.concurrent.ConcurrentUtils.createIfAbsentUnchecked; | ||
43 | +import static org.onlab.onos.net.flow.FlowRuleEvent.Type.RULE_REMOVED; | ||
44 | +import static org.slf4j.LoggerFactory.getLogger; | ||
46 | 45 | ||
47 | /** | 46 | /** |
48 | * Manages inventory of flow rules using trivial in-memory implementation. | 47 | * Manages inventory of flow rules using trivial in-memory implementation. |
... | @@ -177,7 +176,7 @@ public class SimpleFlowRuleStore | ... | @@ -177,7 +176,7 @@ public class SimpleFlowRuleStore |
177 | // new flow rule added | 176 | // new flow rule added |
178 | existing.add(f); | 177 | existing.add(f); |
179 | notifyDelegate(FlowRuleBatchEvent.requested( | 178 | notifyDelegate(FlowRuleBatchEvent.requested( |
180 | - new FlowRuleBatchRequest( 1, /* FIXME generate something */ | 179 | + new FlowRuleBatchRequest(1, /* FIXME generate something */ |
181 | Arrays.<FlowEntry>asList(f), | 180 | Arrays.<FlowEntry>asList(f), |
182 | Collections.<FlowEntry>emptyList()))); | 181 | Collections.<FlowEntry>emptyList()))); |
183 | } | 182 | } | ... | ... |
-
Please register or login to post a comment