Bulk merge of l2gw changes
[netvirt.git] / elanmanager / impl / src / main / java / org / opendaylight / netvirt / elan / l2gw / ha / commands / IMergeCommand.java
1 /*
2  * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.netvirt.elan.l2gw.ha.commands;
9
10 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
11 import org.opendaylight.yangtools.concepts.Builder;
12 import org.opendaylight.yangtools.yang.binding.DataObject;
13 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
14
15 public interface IMergeCommand<T extends DataObject, Y extends Builder, Z extends DataObject> {
16
17     /**
18      * Abstract function to merge data from src to dst in Operational Topology.
19      * while existing data helps in keeping track of data only updated
20      * @param dst Builder which will be used to build concrete object
21      * @param existingData dataObject which are already exisitng
22      * @param src dataObjects of source
23      * @param nodePath nodePath of dest
24      */
25     void mergeOperationalData(Y dst,
26                               Z existingData,
27                               Z src,
28                               InstanceIdentifier<Node> nodePath);
29
30     /**
31      * Abstract function to merge data from src to dst in Config Topology.
32      * @param dst builder which will be used to build concrete object
33      * @param src builder which are to be merged in destination
34      * @param nodePath nodePath of dest
35      */
36     void mergeConfigData(Y dst,
37                          Z src,
38                          InstanceIdentifier<Node> nodePath);
39 }