2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
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
9 package org.opendaylight.controller.frm;
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;
17 * forwardingrules-manager
18 * org.opendaylight.controller.frm
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.
25 * @author <a href="mailto:vdemcak@cisco.com">Vaclav Demcak</a>
27 * Created: Aug 25, 2014
29 public interface ForwardingRulesCommiter <D extends DataObject> extends AutoCloseable, DataChangeListener {
32 * Method removes DataObject which is identified by InstanceIdentifier
35 * @param InstanceIdentifier identifier - the whole path to DataObject
36 * @param DataObject remove - DataObject for removing
37 * @param InstanceIdentifier<FlowCapableNode> parent Node InstanceIdentifier
39 void remove(InstanceIdentifier<D> identifier, D del,
40 InstanceIdentifier<FlowCapableNode> nodeIdent);
43 * Method updates the original DataObject to the update DataObject
44 * in device. Both are identified by same InstanceIdentifier
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)
50 void update(InstanceIdentifier<D> identifier, D original, D update,
51 InstanceIdentifier<FlowCapableNode> nodeIdent);
54 * Method adds the DataObject which is identified by InstanceIdentifier
57 * @param InstanceIdentifier identifier - the whole path to new DataObject
58 * @param DataObject add - new DataObject
60 void add(InstanceIdentifier<D> identifier, D add,
61 InstanceIdentifier<FlowCapableNode> nodeIdent);