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
20 * org.opendaylight.openflowplugin.applications.frm
22 * ForwardingRulesCommiter
23 * It represent a contract between DataStore DataTreeModification and relevant
24 * SalRpcService for device. Every implementation has to be registered for
25 * Configurational/DS tree path.
27 public interface ForwardingRulesCommiter <D extends DataObject> extends AutoCloseable, ClusteredDataTreeChangeListener<D> {
30 * Method removes DataObject which is identified by InstanceIdentifier
33 * @param identifier - the whole path to DataObject
34 * @param del - DataObject for removing
35 * @param nodeIdent Node InstanceIdentifier
37 void remove(InstanceIdentifier<D> identifier, D del,
38 InstanceIdentifier<FlowCapableNode> nodeIdent);
41 * Method updates the original DataObject to the update DataObject
42 * in device. Both are identified by same InstanceIdentifier
44 * @param identifier - the whole path to DataObject
45 * @param original - original DataObject (for update)
46 * @param update - changed DataObject (contain updates)
47 * @param nodeIdent Node InstanceIdentifier
49 void update(InstanceIdentifier<D> identifier, D original, D update,
50 InstanceIdentifier<FlowCapableNode> nodeIdent);
53 * Method adds the DataObject which is identified by InstanceIdentifier
56 * @param identifier - the whole path to new DataObject
57 * @param add - new DataObject
58 * @param nodeIdent Node InstanceIdentifier
59 * @return A future associated with RPC task. {@code null} is set to the
60 * future if this method does not invoke RPC.
62 Future<? extends RpcResult> add(InstanceIdentifier<D> identifier, D add,
63 InstanceIdentifier<FlowCapableNode> nodeIdent);
67 * Method creates stale-marked DataObject which is identified by InstanceIdentifier
70 * @param identifier - the whole path to DataObject
71 * @param del - DataObject removed. Stale-Mark object to be created from this object
72 * @param nodeIdent Node InstanceIdentifier
74 void createStaleMarkEntity(InstanceIdentifier<D> identifier, D del,
75 InstanceIdentifier<FlowCapableNode> nodeIdent);
79 Future<? extends RpcResult> removeWithResult(InstanceIdentifier<D> identifier, D del,
80 InstanceIdentifier<FlowCapableNode> nodeIdent);