Bug 6692: remove InstanceIdentifierCodec instance from SBU
[ovsdb.git] / southbound / southbound-impl / src / main / java / org / opendaylight / ovsdb / southbound / ovsdb / transact / TransactCommand.java
1 /*
2  * Copyright (c) 2014, 2016 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.ovsdb.southbound.ovsdb.transact;
9
10 import java.util.Collection;
11
12 import org.opendaylight.controller.md.sal.binding.api.DataTreeModification;
13 import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeEvent;
14 import org.opendaylight.ovsdb.lib.operations.TransactionBuilder;
15 import org.opendaylight.ovsdb.southbound.InstanceIdentifierCodec;
16 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
17 import org.opendaylight.yangtools.yang.binding.DataObject;
18 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
19
20 /**
21  * Contract for a transactional command.
22  */
23 public interface TransactCommand {
24     /**
25      * Queue the command defined by the class implementing this interface in the given transaction builder, with the
26      * given bridge state, in reaction to the given events.
27      *
28      * @param transaction The transaction builder.
29      * @param state The bridge state.
30      * @param events The events to be represented.
31      * @param instanceIdentifierCodec The instance identifier codec to use.
32      */
33     void execute(TransactionBuilder transaction, BridgeOperationalState state,
34                  AsyncDataChangeEvent<InstanceIdentifier<?>, DataObject> events,
35                  InstanceIdentifierCodec instanceIdentifierCodec);
36
37     /**
38      * Queue the command defined by the class implementing this interface in the given transaction builder, with the
39      * given bridge state, in reaction to the given modifications.
40      *
41      * @param transaction The transaction builder.
42      * @param state The bridge state.
43      * @param modifications The modifications to be represented.
44      * @param instanceIdentifierCodec The instance identifier codec to use.
45      */
46     void execute(TransactionBuilder transaction, BridgeOperationalState state,
47                  Collection<DataTreeModification<Node>> modifications,
48                  InstanceIdentifierCodec instanceIdentifierCodec);
49 }