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
8 package org.opendaylight.openflowplugin.applications.frm;
10 import java.util.concurrent.Future;
11 import org.opendaylight.mdsal.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;
18 * forwardingrules-manager org.opendaylight.openflowplugin.applications.frm
21 * ForwardingRulesCommiter It represent a contract between DataStore
22 * DataTreeModification and relevant SalRpcService for device. Every
23 * implementation has to be registered for Configurational/DS tree path.
25 public interface ForwardingRulesCommiter<D extends DataObject>
26 extends AutoCloseable, ClusteredDataTreeChangeListener<D> {
29 * Method removes DataObject which is identified by InstanceIdentifier from
33 * - the whole path to DataObject
35 * - DataObject for removing
37 * Node InstanceIdentifier
39 void remove(InstanceIdentifier<D> identifier, D del, InstanceIdentifier<FlowCapableNode> nodeIdent);
42 * Method updates the original DataObject to the update DataObject in device.
43 * Both are identified by same InstanceIdentifier
46 * - the whole path to DataObject
48 * - original DataObject (for update)
50 * - changed DataObject (contain updates)
52 * Node InstanceIdentifier
54 void update(InstanceIdentifier<D> identifier, D original, D update, InstanceIdentifier<FlowCapableNode> nodeIdent);
57 * Method adds the DataObject which is identified by InstanceIdentifier to
61 * - the whole path to new DataObject
65 * Node InstanceIdentifier
66 * @return A future associated with RPC task. {@code null} is set to the future
67 * if this method does not invoke RPC.
69 Future<? extends RpcResult<?>> add(InstanceIdentifier<D> identifier, D add,
70 InstanceIdentifier<FlowCapableNode> nodeIdent);
73 * Method creates stale-marked DataObject which is identified by
74 * InstanceIdentifier from device.
77 * - the whole path to DataObject
79 * - DataObject removed. Stale-Mark object to be created from this
82 * Node InstanceIdentifier
84 void createStaleMarkEntity(InstanceIdentifier<D> identifier, D del, InstanceIdentifier<FlowCapableNode> nodeIdent);
86 Future<? extends RpcResult<?>> removeWithResult(InstanceIdentifier<D> identifier, D del,
87 InstanceIdentifier<FlowCapableNode> nodeIdent);