744d523faafbba437bda81eb15cb2ac35b771021
[netvirt.git] / elanmanager / impl / src / main / java / org / opendaylight / netvirt / elan / l2gw / ha / handlers / INodeCopier.java
1 /*
2  * Copyright (c) 2017 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.handlers;
9
10 import com.google.common.base.Optional;
11 import java.util.concurrent.ExecutionException;
12 import org.opendaylight.genius.infra.Datastore;
13 import org.opendaylight.genius.infra.TypedReadWriteTransaction;
14 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
15 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
16
17 public interface INodeCopier {
18
19     <D extends Datastore> void copyGlobalNode(Optional<Node> globalNodeOptional,
20                         InstanceIdentifier<Node> srcPath,
21                         InstanceIdentifier<Node> dstPath,
22                         Class<D> datastoreType,
23                         TypedReadWriteTransaction<D> tx)
24         throws ExecutionException, InterruptedException;
25
26     <D extends Datastore> void copyPSNode(Optional<Node> psNodeOptional,
27                     InstanceIdentifier<Node> srcPsPath,
28                     InstanceIdentifier<Node> dstPsPath,
29                     InstanceIdentifier<Node> dstGlobalPath,
30                     Class<D> datastoreType,
31                     TypedReadWriteTransaction<D> tx)
32         throws ExecutionException, InterruptedException;
33 }