2 * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.openflowplugin.applications.frsync.impl.strategy;
10 import java.util.List;
12 import org.opendaylight.openflowplugin.applications.frsync.util.ItemSyncBox;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.meters.Meter;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.TableKey;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.Group;
18 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
21 * Wraps all the required inputs (diffs) for synchronization strategy execution.
23 public class SynchronizationDiffInput {
25 private final InstanceIdentifier<FlowCapableNode> nodeIdent;
26 private final List<ItemSyncBox<Group>> groupsToAddOrUpdate;
27 private final ItemSyncBox<Meter> metersToAddOrUpdate;
28 private final Map<TableKey, ItemSyncBox<Flow>> flowsToAddOrUpdate;
29 private final Map<TableKey, ItemSyncBox<Flow>> flowsToRemove;
30 private final ItemSyncBox<Meter> metersToRemove;
31 private final List<ItemSyncBox<Group>> groupsToRemove;
33 public SynchronizationDiffInput(final InstanceIdentifier<FlowCapableNode> nodeIdent,
34 final List<ItemSyncBox<Group>> groupsToAddOrUpdate,
35 final ItemSyncBox<Meter> metersToAddOrUpdate,
36 final Map<TableKey, ItemSyncBox<Flow>> flowsToAddOrUpdate,
37 final Map<TableKey, ItemSyncBox<Flow>> flowsToRemove,
38 final ItemSyncBox<Meter> metersToRemove,
39 final List<ItemSyncBox<Group>> groupsToRemove) {
40 this.nodeIdent = nodeIdent;
41 this.groupsToAddOrUpdate = groupsToAddOrUpdate;
42 this.metersToAddOrUpdate = metersToAddOrUpdate;
43 this.flowsToAddOrUpdate = flowsToAddOrUpdate;
44 this.flowsToRemove = flowsToRemove;
45 this.metersToRemove = metersToRemove;
46 this.groupsToRemove = groupsToRemove;
49 public InstanceIdentifier<FlowCapableNode> getNodeIdent() {
53 public List<ItemSyncBox<Group>> getGroupsToAddOrUpdate() {
54 return groupsToAddOrUpdate;
57 public ItemSyncBox<Meter> getMetersToAddOrUpdate() {
58 return metersToAddOrUpdate;
61 public Map<TableKey, ItemSyncBox<Flow>> getFlowsToAddOrUpdate() {
62 return flowsToAddOrUpdate;
65 public Map<TableKey, ItemSyncBox<Flow>> getFlowsToRemove() {
69 public ItemSyncBox<Meter> getMetersToRemove() {
70 return metersToRemove;
73 public List<ItemSyncBox<Group>> getGroupsToRemove() {
74 return groupsToRemove;