Yuta HIGUCHI

bugfix

Change-Id: I24122eeda1c66ebe8598beaec0ff23bd33b262a0
...@@ -127,7 +127,7 @@ public class DistributedFlowRuleStore ...@@ -127,7 +127,7 @@ public class DistributedFlowRuleStore
127 @Override 127 @Override
128 public void storeFlowRule(FlowRule rule) { 128 public void storeFlowRule(FlowRule rule) {
129 ReplicaInfo replicaInfo = replicaInfoManager.getReplicaInfoFor(rule.deviceId()); 129 ReplicaInfo replicaInfo = replicaInfoManager.getReplicaInfoFor(rule.deviceId());
130 - if (replicaInfo.master().get().equals(clusterService.getLocalNode())) { 130 + if (replicaInfo.master().get().equals(clusterService.getLocalNode().id())) {
131 storeFlowEntryInternal(rule); 131 storeFlowEntryInternal(rule);
132 return; 132 return;
133 } 133 }
...@@ -146,7 +146,7 @@ public class DistributedFlowRuleStore ...@@ -146,7 +146,7 @@ public class DistributedFlowRuleStore
146 } 146 }
147 } 147 }
148 148
149 - public synchronized void storeFlowEntryInternal(FlowRule flowRule) { 149 + private synchronized void storeFlowEntryInternal(FlowRule flowRule) {
150 FlowEntry flowEntry = new DefaultFlowEntry(flowRule); 150 FlowEntry flowEntry = new DefaultFlowEntry(flowRule);
151 DeviceId deviceId = flowRule.deviceId(); 151 DeviceId deviceId = flowRule.deviceId();
152 // write to local copy. 152 // write to local copy.
...@@ -161,7 +161,7 @@ public class DistributedFlowRuleStore ...@@ -161,7 +161,7 @@ public class DistributedFlowRuleStore
161 @Override 161 @Override
162 public synchronized void deleteFlowRule(FlowRule rule) { 162 public synchronized void deleteFlowRule(FlowRule rule) {
163 ReplicaInfo replicaInfo = replicaInfoManager.getReplicaInfoFor(rule.deviceId()); 163 ReplicaInfo replicaInfo = replicaInfoManager.getReplicaInfoFor(rule.deviceId());
164 - if (replicaInfo.master().get().equals(clusterService.getLocalNode())) { 164 + if (replicaInfo.master().get().equals(clusterService.getLocalNode().id())) {
165 deleteFlowRuleInternal(rule); 165 deleteFlowRuleInternal(rule);
166 return; 166 return;
167 } 167 }
...@@ -180,7 +180,7 @@ public class DistributedFlowRuleStore ...@@ -180,7 +180,7 @@ public class DistributedFlowRuleStore
180 } 180 }
181 } 181 }
182 182
183 - public synchronized void deleteFlowRuleInternal(FlowRule flowRule) { 183 + private synchronized void deleteFlowRuleInternal(FlowRule flowRule) {
184 FlowEntry entry = getFlowEntry(flowRule); 184 FlowEntry entry = getFlowEntry(flowRule);
185 if (entry == null) { 185 if (entry == null) {
186 return; 186 return;
...@@ -192,7 +192,7 @@ public class DistributedFlowRuleStore ...@@ -192,7 +192,7 @@ public class DistributedFlowRuleStore
192 @Override 192 @Override
193 public FlowRuleEvent addOrUpdateFlowRule(FlowEntry rule) { 193 public FlowRuleEvent addOrUpdateFlowRule(FlowEntry rule) {
194 ReplicaInfo replicaInfo = replicaInfoManager.getReplicaInfoFor(rule.deviceId()); 194 ReplicaInfo replicaInfo = replicaInfoManager.getReplicaInfoFor(rule.deviceId());
195 - if (replicaInfo.master().get().equals(clusterService.getLocalNode())) { 195 + if (replicaInfo.master().get().equals(clusterService.getLocalNode().id())) {
196 return addOrUpdateFlowRuleInternal(rule); 196 return addOrUpdateFlowRuleInternal(rule);
197 } 197 }
198 198
...@@ -235,7 +235,7 @@ public class DistributedFlowRuleStore ...@@ -235,7 +235,7 @@ public class DistributedFlowRuleStore
235 @Override 235 @Override
236 public FlowRuleEvent removeFlowRule(FlowEntry rule) { 236 public FlowRuleEvent removeFlowRule(FlowEntry rule) {
237 ReplicaInfo replicaInfo = replicaInfoManager.getReplicaInfoFor(rule.deviceId()); 237 ReplicaInfo replicaInfo = replicaInfoManager.getReplicaInfoFor(rule.deviceId());
238 - if (replicaInfo.master().get().equals(clusterService.getLocalNode())) { 238 + if (replicaInfo.master().get().equals(clusterService.getLocalNode().id())) {
239 // bypass and handle it locally 239 // bypass and handle it locally
240 return removeFlowRuleInternal(rule); 240 return removeFlowRuleInternal(rule);
241 } 241 }
......