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.openflowplugin.applications.frm;
11 import org.opendaylight.controller.md.sal.binding.api.DataTreeChangeListener;
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.openflowplugin.applications.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, DataTreeChangeListener<D> {
32 * Method removes DataObject which is identified by InstanceIdentifier
35 * @param identifier - the whole path to DataObject
36 * @param del - DataObject for removing
37 * @param nodeIdent 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 identifier - the whole path to DataObject
47 * @param original - original DataObject (for update)
48 * @param update - changed DataObject (contain updates)
49 * @param nodeIdent Node InstanceIdentifier
51 void update(InstanceIdentifier<D> identifier, D original, D update,
52 InstanceIdentifier<FlowCapableNode> nodeIdent);
55 * Method adds the DataObject which is identified by InstanceIdentifier
58 * @param identifier - the whole path to new DataObject
59 * @param add - new DataObject
60 * @param nodeIdent Node InstanceIdentifier
62 void add(InstanceIdentifier<D> identifier, D add,
63 InstanceIdentifier<FlowCapableNode> nodeIdent);