Sho SHIMIZU
Committed by Thomas Vachuska

Provide hasFailed explicitly

Change-Id: I3bacbbfcc84259b8bb6904d21b45a1e9e9e60e7a
...@@ -612,11 +612,11 @@ public class FlowRuleManager ...@@ -612,11 +612,11 @@ public class FlowRuleManager
612 this.pendingDevices = new HashSet<>(); 612 this.pendingDevices = new HashSet<>();
613 } 613 }
614 614
615 - FlowOperationsProcessor(FlowOperationsProcessor src) { 615 + FlowOperationsProcessor(FlowOperationsProcessor src, boolean hasFailed) {
616 this.fops = src.fops; 616 this.fops = src.fops;
617 this.stages = Lists.newArrayList(src.stages); 617 this.stages = Lists.newArrayList(src.stages);
618 this.pendingDevices = new HashSet<>(src.pendingDevices); 618 this.pendingDevices = new HashSet<>(src.pendingDevices);
619 - this.hasFailed = src.hasFailed; 619 + this.hasFailed = hasFailed;
620 } 620 }
621 621
622 @Override 622 @Override
...@@ -649,15 +649,14 @@ public class FlowRuleManager ...@@ -649,15 +649,14 @@ public class FlowRuleManager
649 synchronized void satisfy(DeviceId devId) { 649 synchronized void satisfy(DeviceId devId) {
650 pendingDevices.remove(devId); 650 pendingDevices.remove(devId);
651 if (pendingDevices.isEmpty()) { 651 if (pendingDevices.isEmpty()) {
652 - operationsService.execute(new FlowOperationsProcessor(this)); 652 + operationsService.execute(new FlowOperationsProcessor(this, hasFailed));
653 } 653 }
654 } 654 }
655 655
656 synchronized void fail(DeviceId devId, Set<? extends FlowRule> failures) { 656 synchronized void fail(DeviceId devId, Set<? extends FlowRule> failures) {
657 - hasFailed = true;
658 pendingDevices.remove(devId); 657 pendingDevices.remove(devId);
659 if (pendingDevices.isEmpty()) { 658 if (pendingDevices.isEmpty()) {
660 - operationsService.execute(new FlowOperationsProcessor(this)); 659 + operationsService.execute(new FlowOperationsProcessor(this, true));
661 } 660 }
662 661
663 FlowRuleOperations.Builder failedOpsBuilder = FlowRuleOperations.builder(); 662 FlowRuleOperations.Builder failedOpsBuilder = FlowRuleOperations.builder();
......