Integration of fcaps applications
[vpnservice.git] / fcapsapplication / fcapsapplication-impl / src / main / java / org / opendaylight / vpnservice / fcapsapp / performancecounter / FlowCapableNodeConnectorCommitter.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.vpnservice.fcapsapp.performancecounter;
9
10 import org.opendaylight.controller.md.sal.binding.api.ClusteredDataTreeChangeListener;
11 import org.opendaylight.controller.md.sal.binding.api.DataTreeChangeListener;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNodeConnector;
13 import org.opendaylight.yangtools.yang.binding.DataObject;
14 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
15
16 public interface FlowCapableNodeConnectorCommitter <D extends DataObject> extends AutoCloseable, ClusteredDataTreeChangeListener<D> {
17     /**
18      * Method removes DataObject which is identified by InstanceIdentifier
19      * from device.
20      *
21      * @param identifier - the whole path to DataObject
22      * @param del - DataObject for removing
23      * @param nodeConnIdent NodeConnector InstanceIdentifier
24      */
25     void remove(InstanceIdentifier<D> identifier, D del,
26                 InstanceIdentifier<FlowCapableNodeConnector> nodeConnIdent);
27
28     /**
29      * Method updates the original DataObject to the update DataObject
30      * in device. Both are identified by same InstanceIdentifier
31      *
32      * @param identifier - the whole path to DataObject
33      * @param original - original DataObject (for update)
34      * @param update - changed DataObject (contain updates)
35      * @param nodeConnIdent NodeConnector InstanceIdentifier
36      */
37     void update(InstanceIdentifier<D> identifier, D original, D update,
38                 InstanceIdentifier<FlowCapableNodeConnector> nodeConnIdent);
39
40     /**
41      * Method adds the DataObject which is identified by InstanceIdentifier
42      * to device.
43      *
44      * @param identifier - the whole path to new DataObject
45      * @param add - new DataObject
46      * @param nodeConnIdent NodeConnector InstanceIdentifier
47      */
48     void add(InstanceIdentifier<D> identifier, D add,
49              InstanceIdentifier<FlowCapableNodeConnector> nodeConnIdent);
50
51 }
52