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-10-17 11:56:06 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0858b35e88cfd7b60278a9d0f837f2270728ff0c
0858b35e
1 parent
7d1ad606
bugfix
Change-Id: I24122eeda1c66ebe8598beaec0ff23bd33b262a0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 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 @
0858b35
...
...
@@ -127,7 +127,7 @@ public class DistributedFlowRuleStore
@Override
public
void
storeFlowRule
(
FlowRule
rule
)
{
ReplicaInfo
replicaInfo
=
replicaInfoManager
.
getReplicaInfoFor
(
rule
.
deviceId
());
if
(
replicaInfo
.
master
().
get
().
equals
(
clusterService
.
getLocalNode
()))
{
if
(
replicaInfo
.
master
().
get
().
equals
(
clusterService
.
getLocalNode
()
.
id
()
))
{
storeFlowEntryInternal
(
rule
);
return
;
}
...
...
@@ -146,7 +146,7 @@ public class DistributedFlowRuleStore
}
}
p
ublic
synchronized
void
storeFlowEntryInternal
(
FlowRule
flowRule
)
{
p
rivate
synchronized
void
storeFlowEntryInternal
(
FlowRule
flowRule
)
{
FlowEntry
flowEntry
=
new
DefaultFlowEntry
(
flowRule
);
DeviceId
deviceId
=
flowRule
.
deviceId
();
// write to local copy.
...
...
@@ -161,7 +161,7 @@ public class DistributedFlowRuleStore
@Override
public
synchronized
void
deleteFlowRule
(
FlowRule
rule
)
{
ReplicaInfo
replicaInfo
=
replicaInfoManager
.
getReplicaInfoFor
(
rule
.
deviceId
());
if
(
replicaInfo
.
master
().
get
().
equals
(
clusterService
.
getLocalNode
()))
{
if
(
replicaInfo
.
master
().
get
().
equals
(
clusterService
.
getLocalNode
()
.
id
()
))
{
deleteFlowRuleInternal
(
rule
);
return
;
}
...
...
@@ -180,7 +180,7 @@ public class DistributedFlowRuleStore
}
}
p
ublic
synchronized
void
deleteFlowRuleInternal
(
FlowRule
flowRule
)
{
p
rivate
synchronized
void
deleteFlowRuleInternal
(
FlowRule
flowRule
)
{
FlowEntry
entry
=
getFlowEntry
(
flowRule
);
if
(
entry
==
null
)
{
return
;
...
...
@@ -192,7 +192,7 @@ public class DistributedFlowRuleStore
@Override
public
FlowRuleEvent
addOrUpdateFlowRule
(
FlowEntry
rule
)
{
ReplicaInfo
replicaInfo
=
replicaInfoManager
.
getReplicaInfoFor
(
rule
.
deviceId
());
if
(
replicaInfo
.
master
().
get
().
equals
(
clusterService
.
getLocalNode
()))
{
if
(
replicaInfo
.
master
().
get
().
equals
(
clusterService
.
getLocalNode
()
.
id
()
))
{
return
addOrUpdateFlowRuleInternal
(
rule
);
}
...
...
@@ -235,7 +235,7 @@ public class DistributedFlowRuleStore
@Override
public
FlowRuleEvent
removeFlowRule
(
FlowEntry
rule
)
{
ReplicaInfo
replicaInfo
=
replicaInfoManager
.
getReplicaInfoFor
(
rule
.
deviceId
());
if
(
replicaInfo
.
master
().
get
().
equals
(
clusterService
.
getLocalNode
()))
{
if
(
replicaInfo
.
master
().
get
().
equals
(
clusterService
.
getLocalNode
()
.
id
()
))
{
// bypass and handle it locally
return
removeFlowRuleInternal
(
rule
);
}
...
...
Please
register
or
login
to post a comment