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 java.util.concurrent.Future;
12 import org.opendaylight.controller.md.sal.binding.api.ClusteredDataTreeChangeListener;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
14 import org.opendaylight.yangtools.yang.binding.DataObject;
15 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
16 import org.opendaylight.yangtools.yang.common.RpcResult;
19 * forwardingrules-manager org.opendaylight.openflowplugin.applications.frm
22 * ForwardingRulesCommiter It represent a contract between DataStore
23 * DataTreeModification and relevant SalRpcService for device. Every
24 * implementation has to be registered for Configurational/DS tree path.
26 public interface ForwardingRulesCommiter<D extends DataObject>
27 extends AutoCloseable, ClusteredDataTreeChangeListener<D> {
30 * Method removes DataObject which is identified by InstanceIdentifier from
34 * - the whole path to DataObject
36 * - DataObject for removing
38 * Node InstanceIdentifier
40 void remove(InstanceIdentifier<D> identifier, D del, InstanceIdentifier<FlowCapableNode> nodeIdent);
43 * Method updates the original DataObject to the update DataObject in device.
44 * Both are identified by same InstanceIdentifier
47 * - the whole path to DataObject
49 * - original DataObject (for update)
51 * - changed DataObject (contain updates)
53 * Node InstanceIdentifier
55 void update(InstanceIdentifier<D> identifier, D original, D update, InstanceIdentifier<FlowCapableNode> nodeIdent);
58 * Method adds the DataObject which is identified by InstanceIdentifier to
62 * - the whole path to new DataObject
66 * Node InstanceIdentifier
67 * @return A future associated with RPC task. {@code null} is set to the future
68 * if this method does not invoke RPC.
70 Future<? extends RpcResult<?>> add(InstanceIdentifier<D> identifier, D add,
71 InstanceIdentifier<FlowCapableNode> nodeIdent);
74 * Method creates stale-marked DataObject which is identified by
75 * InstanceIdentifier from device.
78 * - the whole path to DataObject
80 * - DataObject removed. Stale-Mark object to be created from this
83 * Node InstanceIdentifier
85 void createStaleMarkEntity(InstanceIdentifier<D> identifier, D del, InstanceIdentifier<FlowCapableNode> nodeIdent);
87 Future<? extends RpcResult<?>> removeWithResult(InstanceIdentifier<D> identifier, D del,
88 InstanceIdentifier<FlowCapableNode> nodeIdent);