Use stateless transaction commands
[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 org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeEvent;
11 import org.opendaylight.ovsdb.lib.operations.TransactionBuilder;
12 import org.opendaylight.yangtools.yang.binding.DataObject;
13 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
14
15 /**
16  * Contract for a transactional command.
17  */
18 public interface TransactCommand {
19     /**
20      * Queue the command defined by the class implementing this interface in the given transaction builder, with the
21      * given bridge state, in reaction to the given events.
22      *
23      * @param transaction The transaction builder.
24      * @param state The bridge state.
25      * @param events The events to be represented.
26      */
27     void execute(TransactionBuilder transaction, BridgeOperationalState state,
28                  AsyncDataChangeEvent<InstanceIdentifier<?>, DataObject> events);
29 }