Merge "Small fix to xsql dependencies"
[controller.git] / opendaylight / md-sal / forwardingrules-manager / src / main / java / org / opendaylight / controller / frm / ForwardingRulesCommiter.java
1 /**
2  * Copyright (c) 2014 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.controller.frm;
10
11 import org.opendaylight.controller.md.sal.binding.api.DataChangeListener;
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
16 /**
17  * forwardingrules-manager
18  * org.opendaylight.controller.frm
19  *
20  * ForwardingRulesCommiter
21  * It represent a contract between DataStore DataChangeEvent and relevant
22  * SalRpcService for device. Every implementation has to be registered for
23  * Configurational/DS tree path.
24  *
25  * @author <a href="mailto:vdemcak@cisco.com">Vaclav Demcak</a>
26  *
27  * Created: Aug 25, 2014
28  */
29 public interface ForwardingRulesCommiter <D extends DataObject> extends AutoCloseable, DataChangeListener {
30
31     /**
32      * Method removes DataObject which is identified by InstanceIdentifier
33      * from device.
34      *
35      * @param InstanceIdentifier identifier - the whole path to DataObject
36      * @param DataObject remove - DataObject for removing
37      * @param InstanceIdentifier<FlowCapableNode> parent Node InstanceIdentifier
38      */
39     void remove(InstanceIdentifier<D> identifier, D del,
40             InstanceIdentifier<FlowCapableNode> nodeIdent);
41
42     /**
43      * Method updates the original DataObject to the update DataObject
44      * in device. Both are identified by same InstanceIdentifier
45      *
46      * @param InstanceIdentifier identifier - the whole path to DataObject
47      * @param DataObject original - original DataObject (for update)
48      * @param DataObject update - changed DataObject (contain updates)
49      */
50     void update(InstanceIdentifier<D> identifier, D original, D update,
51             InstanceIdentifier<FlowCapableNode> nodeIdent);
52
53     /**
54      * Method adds the DataObject which is identified by InstanceIdentifier
55      * to device.
56      *
57      * @param InstanceIdentifier identifier - the whole path to new DataObject
58      * @param DataObject add - new DataObject
59      */
60     void add(InstanceIdentifier<D> identifier, D add,
61             InstanceIdentifier<FlowCapableNode> nodeIdent);
62
63 }
64