Deprecate all MD-SAL APIs
[controller.git] / opendaylight / md-sal / sal-common-api / src / main / java / org / opendaylight / controller / md / sal / common / api / data / AsyncDataBroker.java
1 /*
2  * Copyright (c) 2014 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.controller.md.sal.common.api.data;
9
10 import org.opendaylight.yangtools.concepts.Path;
11
12 /**
13  * Base interface that provides access to a conceptual data tree store and also provides the ability to
14  * subscribe for changes to data under a given branch of the tree.
15  *
16  * <p>
17  * All operations on the data tree are performed via one of the transactions:
18  * <ul>
19  * <li>Read-Only - allocated using {@link #newReadOnlyTransaction()}
20  * <li>Write-Only - allocated using {@link #newWriteOnlyTransaction()}
21  * <li>Read-Write - allocated using {@link #newReadWriteTransaction()}
22  * </ul>
23  *
24  * <p>
25  * These transactions provide a stable isolated view of data tree, which is
26  * guaranteed to be not affected by other concurrent transactions, until
27  * transaction is committed.
28  *
29  * <p>
30  * For a detailed explanation of how transaction are isolated and how transaction-local
31  * changes are committed to global data tree, see
32  * {@link AsyncReadTransaction}, {@link AsyncWriteTransaction},
33  * {@link AsyncReadWriteTransaction} and {@link AsyncWriteTransaction#submit()}.
34  *
35  *
36  * <p>
37  * It is strongly recommended to use the type of transaction, which
38  * provides only the minimal capabilities you need. This allows for
39  * optimizations at the data broker / data store level. For example,
40  * implementations may optimize the transaction for reading if they know ahead
41  * of time that you only need to read data - such as not keeping additional meta-data,
42  * which may be required for write transactions.
43  *
44  * <p>
45  * <b>Implementation Note:</b> This interface is not intended to be implemented
46  * by users of MD-SAL, but only to be consumed by them.
47  *
48  * @param <P>
49  *            Type of path (subtree identifier), which represents location in
50  *            tree
51  * @param <D>
52  *            Type of data (payload), which represents data payload
53  */
54 @Deprecated
55 public interface AsyncDataBroker<P extends Path<P>, D> extends AsyncDataTransactionFactory<P, D> {
56
57     @Override
58     AsyncReadOnlyTransaction<P, D> newReadOnlyTransaction();
59
60     @Override
61     AsyncReadWriteTransaction<P, D> newReadWriteTransaction();
62
63     @Override
64     AsyncWriteTransaction<P, D> newWriteOnlyTransaction();
65 }