Committed by
Ray Milkey
Remove redundant field
Change-Id: I6a7adbce08e589e29763b1f7144d3a8d8742df9d
Showing
1 changed file
with
4 additions
and
7 deletions
... | @@ -52,7 +52,6 @@ import org.onosproject.net.flow.FlowRuleEvent; | ... | @@ -52,7 +52,6 @@ import org.onosproject.net.flow.FlowRuleEvent; |
52 | import org.onosproject.net.flow.FlowRuleListener; | 52 | import org.onosproject.net.flow.FlowRuleListener; |
53 | import org.onosproject.net.flow.FlowRuleOperation; | 53 | import org.onosproject.net.flow.FlowRuleOperation; |
54 | import org.onosproject.net.flow.FlowRuleOperations; | 54 | import org.onosproject.net.flow.FlowRuleOperations; |
55 | -import org.onosproject.net.flow.FlowRuleOperationsContext; | ||
56 | import org.onosproject.net.flow.FlowRuleProvider; | 55 | import org.onosproject.net.flow.FlowRuleProvider; |
57 | import org.onosproject.net.flow.FlowRuleProviderRegistry; | 56 | import org.onosproject.net.flow.FlowRuleProviderRegistry; |
58 | import org.onosproject.net.flow.FlowRuleProviderService; | 57 | import org.onosproject.net.flow.FlowRuleProviderService; |
... | @@ -601,7 +600,6 @@ public class FlowRuleManager | ... | @@ -601,7 +600,6 @@ public class FlowRuleManager |
601 | private class FlowOperationsProcessor implements Runnable { | 600 | private class FlowOperationsProcessor implements Runnable { |
602 | 601 | ||
603 | private final List<Set<FlowRuleOperation>> stages; | 602 | private final List<Set<FlowRuleOperation>> stages; |
604 | - private final FlowRuleOperationsContext context; | ||
605 | private final FlowRuleOperations fops; | 603 | private final FlowRuleOperations fops; |
606 | private boolean hasFailed = false; | 604 | private boolean hasFailed = false; |
607 | 605 | ||
... | @@ -609,7 +607,6 @@ public class FlowRuleManager | ... | @@ -609,7 +607,6 @@ public class FlowRuleManager |
609 | 607 | ||
610 | FlowOperationsProcessor(FlowRuleOperations ops) { | 608 | FlowOperationsProcessor(FlowRuleOperations ops) { |
611 | this.stages = Lists.newArrayList(ops.stages()); | 609 | this.stages = Lists.newArrayList(ops.stages()); |
612 | - this.context = ops.callback(); | ||
613 | this.fops = ops; | 610 | this.fops = ops; |
614 | } | 611 | } |
615 | 612 | ||
... | @@ -617,8 +614,8 @@ public class FlowRuleManager | ... | @@ -617,8 +614,8 @@ public class FlowRuleManager |
617 | public synchronized void run() { | 614 | public synchronized void run() { |
618 | if (stages.size() > 0) { | 615 | if (stages.size() > 0) { |
619 | process(stages.remove(0)); | 616 | process(stages.remove(0)); |
620 | - } else if (!hasFailed && context != null) { | 617 | + } else if (!hasFailed && fops.callback() != null) { |
621 | - context.onSuccess(fops); | 618 | + fops.callback().onSuccess(fops); |
622 | } | 619 | } |
623 | } | 620 | } |
624 | 621 | ||
... | @@ -654,12 +651,12 @@ public class FlowRuleManager | ... | @@ -654,12 +651,12 @@ public class FlowRuleManager |
654 | operationsService.execute(this); | 651 | operationsService.execute(this); |
655 | } | 652 | } |
656 | 653 | ||
657 | - if (context != null) { | 654 | + if (fops.callback() != null) { |
658 | final FlowRuleOperations.Builder failedOpsBuilder = | 655 | final FlowRuleOperations.Builder failedOpsBuilder = |
659 | FlowRuleOperations.builder(); | 656 | FlowRuleOperations.builder(); |
660 | failures.forEach(failedOpsBuilder::add); | 657 | failures.forEach(failedOpsBuilder::add); |
661 | 658 | ||
662 | - context.onError(failedOpsBuilder.build()); | 659 | + fops.callback().onError(failedOpsBuilder.build()); |
663 | } | 660 | } |
664 | } | 661 | } |
665 | } | 662 | } | ... | ... |
-
Please register or login to post a comment