Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Yuta HIGUCHI
2014-11-04 12:25:47 -0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e9b2b00b99187a399bbef82ed4e50ff8f23a0bfc
e9b2b00b
1 parent
2524891f
Add missing synchronized
Change-Id: Ie391feb6ef0fa79ea859e89e8a2fd51d59f03cea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
core/store/dist/src/main/java/org/onlab/onos/store/flow/impl/DistributedFlowRuleStore.java
core/store/dist/src/main/java/org/onlab/onos/store/flow/impl/DistributedFlowRuleStore.java
View file @
e9b2b00
...
...
@@ -106,10 +106,11 @@ public class DistributedFlowRuleStore
private
final
Logger
log
=
getLogger
(
getClass
());
// primary data:
// read/write needs to be synchronized
// store entries as a pile of rules, no info about device tables
private
final
Multimap
<
DeviceId
,
StoredFlowEntry
>
flowEntries
=
ArrayListMultimap
.<
DeviceId
,
StoredFlowEntry
>
create
();
private
final
Multimap
<
DeviceId
,
StoredFlowEntry
>
flowEntries
=
ArrayListMultimap
.<
DeviceId
,
StoredFlowEntry
>
create
();
@Reference
(
cardinality
=
ReferenceCardinality
.
MANDATORY_UNARY
)
protected
ReplicaInfoService
replicaInfoManager
;
...
...
@@ -135,6 +136,7 @@ public class DistributedFlowRuleStore
//.removalListener(listener)
.
build
();
// Cache of SMaps used for backup data. each SMap contain device flow table
private
LoadingCache
<
DeviceId
,
SMap
<
FlowId
,
ImmutableList
<
StoredFlowEntry
>>>
smaps
;
...
...
@@ -311,7 +313,7 @@ public class DistributedFlowRuleStore
}
}
private
Set
<
FlowEntry
>
getFlowEntriesInternal
(
DeviceId
deviceId
)
{
private
synchronized
Set
<
FlowEntry
>
getFlowEntriesInternal
(
DeviceId
deviceId
)
{
Collection
<?
extends
FlowEntry
>
rules
=
flowEntries
.
get
(
deviceId
);
if
(
rules
==
null
)
{
return
Collections
.
emptySet
();
...
...
@@ -365,7 +367,9 @@ public class DistributedFlowRuleStore
}
}
private
ListenableFuture
<
CompletedBatchOperation
>
storeBatchInternal
(
FlowRuleBatchOperation
operation
)
{
private
synchronized
ListenableFuture
<
CompletedBatchOperation
>
storeBatchInternal
(
FlowRuleBatchOperation
operation
)
{
final
List
<
StoredFlowEntry
>
toRemove
=
new
ArrayList
<>();
final
List
<
StoredFlowEntry
>
toAdd
=
new
ArrayList
<>();
DeviceId
did
=
null
;
...
...
Please
register
or
login
to post a comment