alshabib | 902d41b | 2014-10-07 16:52:05 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net.flow; |
| 2 | |
alshabib | 193525b | 2014-10-08 18:58:03 -0700 | [diff] [blame^] | 3 | import java.util.List; |
| 4 | |
| 5 | import com.google.common.collect.ImmutableList; |
| 6 | |
| 7 | public class CompletedBatchOperation implements BatchOperationResult<FlowEntry> { |
| 8 | |
| 9 | |
| 10 | private final boolean success; |
| 11 | private final List<FlowEntry> failures; |
| 12 | |
| 13 | public CompletedBatchOperation(boolean success, List<FlowEntry> failures) { |
| 14 | this.success = success; |
| 15 | this.failures = ImmutableList.copyOf(failures); |
| 16 | } |
| 17 | |
| 18 | @Override |
| 19 | public boolean isSuccess() { |
| 20 | return success; |
| 21 | } |
| 22 | |
| 23 | @Override |
| 24 | public List<FlowEntry> failedItems() { |
| 25 | return failures; |
| 26 | } |
alshabib | 902d41b | 2014-10-07 16:52:05 -0700 | [diff] [blame] | 27 | |
| 28 | |
| 29 | } |