Enhance the use of cache in HwvtepDeviceInfo
[ovsdb.git] / hwvtepsouthbound / hwvtepsouthbound-impl / src / main / java / org / opendaylight / ovsdb / hwvtepsouthbound / transactions / md / TransactionCommand.java
1 /*
2  * Copyright (c) 2015, 2017 Ericsson India Global Services Pvt Ltd. 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
9 package org.opendaylight.ovsdb.hwvtepsouthbound.transactions.md;
10
11 import com.google.common.util.concurrent.ListenableFuture;
12 import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
13
14 public interface TransactionCommand {
15
16     void execute(ReadWriteTransaction transaction);
17
18     default void onSuccess() {
19     }
20
21     default void onFailure() {
22     }
23
24     /**
25      * Sets the result future of the executed/submitted transaction.
26      */
27     default void setTransactionResultFuture(ListenableFuture future) {
28     }
29
30     default ListenableFuture getTransactionResultFuture() {
31         return null;
32     }
33 }