Provide hasFailed explicitly
Change-Id: I3bacbbfcc84259b8bb6904d21b45a1e9e9e60e7a
Showing
1 changed file
with
4 additions
and
5 deletions
... | @@ -591,11 +591,11 @@ public class FlowRuleManager | ... | @@ -591,11 +591,11 @@ public class FlowRuleManager |
591 | this.pendingDevices = new HashSet<>(); | 591 | this.pendingDevices = new HashSet<>(); |
592 | } | 592 | } |
593 | 593 | ||
594 | - FlowOperationsProcessor(FlowOperationsProcessor src) { | 594 | + FlowOperationsProcessor(FlowOperationsProcessor src, boolean hasFailed) { |
595 | this.fops = src.fops; | 595 | this.fops = src.fops; |
596 | this.stages = Lists.newArrayList(src.stages); | 596 | this.stages = Lists.newArrayList(src.stages); |
597 | this.pendingDevices = new HashSet<>(src.pendingDevices); | 597 | this.pendingDevices = new HashSet<>(src.pendingDevices); |
598 | - this.hasFailed = src.hasFailed; | 598 | + this.hasFailed = hasFailed; |
599 | } | 599 | } |
600 | 600 | ||
601 | @Override | 601 | @Override |
... | @@ -628,15 +628,14 @@ public class FlowRuleManager | ... | @@ -628,15 +628,14 @@ public class FlowRuleManager |
628 | synchronized void satisfy(DeviceId devId) { | 628 | synchronized void satisfy(DeviceId devId) { |
629 | pendingDevices.remove(devId); | 629 | pendingDevices.remove(devId); |
630 | if (pendingDevices.isEmpty()) { | 630 | if (pendingDevices.isEmpty()) { |
631 | - operationsService.execute(new FlowOperationsProcessor(this)); | 631 | + operationsService.execute(new FlowOperationsProcessor(this, hasFailed)); |
632 | } | 632 | } |
633 | } | 633 | } |
634 | 634 | ||
635 | synchronized void fail(DeviceId devId, Set<? extends FlowRule> failures) { | 635 | synchronized void fail(DeviceId devId, Set<? extends FlowRule> failures) { |
636 | - hasFailed = true; | ||
637 | pendingDevices.remove(devId); | 636 | pendingDevices.remove(devId); |
638 | if (pendingDevices.isEmpty()) { | 637 | if (pendingDevices.isEmpty()) { |
639 | - operationsService.execute(new FlowOperationsProcessor(this)); | 638 | + operationsService.execute(new FlowOperationsProcessor(this, true)); |
640 | } | 639 | } |
641 | 640 | ||
642 | FlowRuleOperations.Builder failedOpsBuilder = FlowRuleOperations.builder(); | 641 | FlowRuleOperations.Builder failedOpsBuilder = FlowRuleOperations.builder(); | ... | ... |
-
Please register or login to post a comment