Cleaning and preparation before bug 6170
[openflowplugin.git] / applications / forwardingrules-sync / src / main / java / org / opendaylight / openflowplugin / applications / frsync / ForwardingRulesUpdateCommitter.java
1 /**
2  * Copyright (c) 2016 Cisco Systems, Inc. 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
9 package org.opendaylight.openflowplugin.applications.frsync;
10
11 import java.util.concurrent.Future;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
13 import org.opendaylight.yangtools.yang.binding.DataObject;
14 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
15 import org.opendaylight.yangtools.yang.common.RpcResult;
16
17 /**
18  * Represents a configuration item update-contract for device.
19  */
20 public interface ForwardingRulesUpdateCommitter<D extends DataObject, U extends DataObject> {
21
22     /**
23      * Method updates the original DataObject to the update DataObject
24      * in device. Both are identified by same InstanceIdentifier
25      *
26      * @param identifier - the whole path to DataObject
27      * @param original   - original DataObject (for update)
28      * @param update     - changed DataObject (contain updates)
29      * @param nodeIdent  - Node InstanceIdentifier
30      * @return RpcResult of action
31      */
32     Future<RpcResult<U>> update(InstanceIdentifier<D> identifier, D original, D update,
33                                 InstanceIdentifier<FlowCapableNode> nodeIdent);
34
35
36 }