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.ClusteredDataTreeChangeListener;
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;
17 import java.util.concurrent.Future;
20 * forwardingrules-manager
21 * org.opendaylight.openflowplugin.applications.frm
23 * ForwardingRulesCommiter
24 * It represent a contract between DataStore DataChangeEvent and relevant
25 * SalRpcService for device. Every implementation has to be registered for
26 * Configurational/DS tree path.
28 * @author <a href="mailto:vdemcak@cisco.com">Vaclav Demcak</a>
30 * Created: Aug 25, 2014
32 public interface ForwardingRulesCommiter <D extends DataObject> extends AutoCloseable, ClusteredDataTreeChangeListener<D> {
35 * Method removes DataObject which is identified by InstanceIdentifier
38 * @param identifier - the whole path to DataObject
39 * @param del - DataObject for removing
40 * @param nodeIdent Node InstanceIdentifier
42 void remove(InstanceIdentifier<D> identifier, D del,
43 InstanceIdentifier<FlowCapableNode> nodeIdent);
46 * Method updates the original DataObject to the update DataObject
47 * in device. Both are identified by same InstanceIdentifier
49 * @param identifier - the whole path to DataObject
50 * @param original - original DataObject (for update)
51 * @param update - changed DataObject (contain updates)
52 * @param nodeIdent Node InstanceIdentifier
54 void update(InstanceIdentifier<D> identifier, D original, D update,
55 InstanceIdentifier<FlowCapableNode> nodeIdent);
58 * Method adds the DataObject which is identified by InstanceIdentifier
61 * @param identifier - the whole path to new DataObject
62 * @param add - new DataObject
63 * @param nodeIdent Node InstanceIdentifier
65 void add(InstanceIdentifier<D> identifier, D add,
66 InstanceIdentifier<FlowCapableNode> nodeIdent);
70 * Method creates stale-marked DataObject which is identified by InstanceIdentifier
73 * @param identifier - the whole path to DataObject
74 * @param del - DataObject removed. Stale-Mark object to be created from this object
75 * @param nodeIdent Node InstanceIdentifier
77 void createStaleMarkEntity(InstanceIdentifier<D> identifier, D del,
78 InstanceIdentifier<FlowCapableNode> nodeIdent);
82 Future<? extends RpcResult> removeWithResult(InstanceIdentifier<D> identifier, D del,
83 InstanceIdentifier<FlowCapableNode> nodeIdent);