Merge "Re-added config.version to config-module-archetype."
[controller.git] / opendaylight / md-sal / sal-binding-api / src / main / java / org / opendaylight / controller / sal / binding / api / data / DataBrokerService.java
1 /*
2  * Copyright (c) 2013 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.sal.binding.api.data;
9
10 import org.opendaylight.controller.md.sal.common.api.data.DataChangePublisher;
11 import org.opendaylight.controller.md.sal.common.api.data.DataModificationTransactionFactory;
12 import org.opendaylight.controller.md.sal.common.api.data.DataReader;
13 import org.opendaylight.controller.sal.binding.api.BindingAwareService;
14 import org.opendaylight.yangtools.concepts.ListenerRegistration;
15 import org.opendaylight.yangtools.yang.binding.DataObject;
16 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
17
18 /**
19  * DataBrokerService provides unified access to the data stores available in the
20  * system.
21  *
22  *
23  * @see DataProviderService
24  * @deprecated Replaced by newer better documented version {@link org.opendaylight.controller.md.sal.binding.api.DataBroker}
25  */
26 @Deprecated
27 public interface DataBrokerService extends //
28         BindingAwareService, //
29         DataModificationTransactionFactory<InstanceIdentifier<? extends DataObject>, DataObject>, //
30         DataReader<InstanceIdentifier<? extends DataObject>, DataObject>, //
31         DataChangePublisher<InstanceIdentifier<? extends DataObject>, DataObject, DataChangeListener> {
32     /**
33      * Creates a data modification transaction.
34      *
35      * @return new blank data modification transaction.
36      * @deprecated Replaced by more specific transaction types. Please use
37      *          {@link org.opendaylight.controller.md.sal.binding.api.DataBroker#newReadOnlyTransaction(),
38      *          {@link org.opendaylight.controller.md.sal.binding.api.DataBroker#newReadWriteTransaction()
39      *          or
40      *          {@link org.opendaylight.controller.md.sal.binding.api.DataBroker#newWriteOnlyTransaction().
41      */
42     @Deprecated
43     @Override
44     DataModificationTransaction beginTransaction();
45
46     /**
47      * Reads data subtree from configurational store.
48      * (Store which is populated by consumer, which is usually used to
49      * inject state into providers. E.g. Flow configuration)
50      *
51      *
52      * @deprecated Please use {@link org.opendaylight.controller.md.sal.binding.api.DataBroker#newReadOnlyTransaction()}
53      *
54      */
55     @Deprecated
56     @Override
57     public DataObject readConfigurationData(InstanceIdentifier<? extends DataObject> path);
58
59     /**
60      * Reads data subtree from operational store.
61      * (Store which is populated by providers, which is usually used to
62      * capture state of providers. E.g. Topology)
63      *
64      * @deprecated Please use {@link org.opendaylight.controller.md.sal.binding.api.DataBroker#newReadOnlyTransaction()}
65      */
66     @Deprecated
67     @Override
68     public DataObject readOperationalData(InstanceIdentifier<? extends DataObject> path);
69
70     /**
71      * Register a data change listener for particular subtree.
72      *
73      * Callback is invoked each time data in subtree changes.
74      *
75      * @deprecated Please use {@link org.opendaylight.controller.md.sal.binding.api.DataBroker#registerDataChangeListener(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType, InstanceIdentifier, org.opendaylight.controller.md.sal.binding.api.DataChangeListener, org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker.DataChangeScope)}
76      * which provides more fine-grained registration options.
77      */
78     @Deprecated
79     @Override
80     public ListenerRegistration<DataChangeListener> registerDataChangeListener(
81             InstanceIdentifier<? extends DataObject> path, DataChangeListener listener);
82 }