Fixes concurrency bug by using a ConcurrentMap
Change-Id: Ib87efe01cb926a3b4c789c9875458ad2ba1b7c8c
Showing
1 changed file
with
3 additions
and
3 deletions
... | @@ -130,11 +130,11 @@ public class OpenFlowRuleProvider extends AbstractProvider | ... | @@ -130,11 +130,11 @@ public class OpenFlowRuleProvider extends AbstractProvider |
130 | private Cache<Long, InternalCacheEntry> pendingBatches; | 130 | private Cache<Long, InternalCacheEntry> pendingBatches; |
131 | 131 | ||
132 | private final Timer timer = new Timer("onos-openflow-collector"); | 132 | private final Timer timer = new Timer("onos-openflow-collector"); |
133 | - private final Map<Dpid, FlowStatsCollector> simpleCollectors = Maps.newHashMap(); | 133 | + private final Map<Dpid, FlowStatsCollector> simpleCollectors = Maps.newConcurrentMap(); |
134 | 134 | ||
135 | // NewAdaptiveFlowStatsCollector Set | 135 | // NewAdaptiveFlowStatsCollector Set |
136 | - private final Map<Dpid, NewAdaptiveFlowStatsCollector> afsCollectors = Maps.newHashMap(); | 136 | + private final Map<Dpid, NewAdaptiveFlowStatsCollector> afsCollectors = Maps.newConcurrentMap(); |
137 | - private final Map<Dpid, TableStatisticsCollector> tableStatsCollectors = Maps.newHashMap(); | 137 | + private final Map<Dpid, TableStatisticsCollector> tableStatsCollectors = Maps.newConcurrentMap(); |
138 | 138 | ||
139 | /** | 139 | /** |
140 | * Creates an OpenFlow host provider. | 140 | * Creates an OpenFlow host provider. | ... | ... |
-
Please register or login to post a comment