Separate out DOMDataTree{Read,Write}Transactions
[mdsal.git] / dom / mdsal-dom-api / src / main / java / org / opendaylight / mdsal / dom / api / DOMDataTreeReadWriteTransaction.java
1 /*
2  * Copyright (c) 2017 Brocade Communications 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.mdsal.dom.api;
9
10 /**
11  * A transaction that provides read/write access to a logical data store.
12  *
13  * <p>
14  * For more information on usage and examples, please see the documentation in {@link DOMDataTreeReadTransaction}
15  * and {@link DOMDataTreeWriteTransaction}.
16  */
17 // FIXME: 4.0.0: extend DOMDataTreeReadOperations instead of DOMDataTreeReadTransaction
18 public interface DOMDataTreeReadWriteTransaction extends DOMDataTreeWriteTransaction, DOMDataTreeReadTransaction {
19     /**
20      * This method is an API design mistake. Users should not use it and use {@link #cancel()} instead. Implementations
21      * should not override it and rely instead of its default implementation, which calls {@link #cancel()}.
22      *
23      * @deprecated Use {@link #cancel()} instead.
24      */
25     @Deprecated
26     @Override
27     default void close() {
28         cancel();
29     }
30 }