Bug 1081 - Deprecate non-asynchronous Data Broker API
[controller.git] / opendaylight / md-sal / sal-dom-api / src / main / java / org / opendaylight / controller / sal / core / api / data / DataProviderService.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.core.api.data;
9
10 import org.opendaylight.controller.md.sal.common.api.data.DataProvisionService;
11 import org.opendaylight.controller.md.sal.common.api.data.DataReader;
12 import org.opendaylight.controller.sal.common.DataStoreIdentifier;
13 import org.opendaylight.controller.sal.core.api.Provider;
14 import org.opendaylight.yangtools.concepts.Registration;
15 import org.opendaylight.yangtools.yang.data.api.CompositeNode;
16 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
17
18 /**
19  *
20  * @deprecated Replaced by {@link org.opendaylight.controller.md.sal.dom.api.DOMDataBroker}
21  *
22  */
23 @Deprecated
24 public interface DataProviderService extends
25     DataBrokerService, //
26     DataProvisionService<InstanceIdentifier, CompositeNode>
27     {
28
29     /**
30      * Adds {@link DataValidator} for specified Data Store
31      *
32      * @param store
33      *            Data Store
34      * @param validator
35      *            Validator
36      */
37     public void addValidator(DataStoreIdentifier store, DataValidator validator);
38
39     /**
40      * Removes {@link DataValidator} from specified Data Store
41      *
42      * @param store
43      * @param validator
44      *            Validator
45      */
46     public void removeValidator(DataStoreIdentifier store,
47             DataValidator validator);
48
49     /**
50      * Adds {@link DataRefresher} for specified data store
51      *
52      * @param store
53      * @param refresher
54      */
55     void addRefresher(DataStoreIdentifier store, DataRefresher refresher);
56
57     /**
58      * Removes {@link DataRefresher} from specified data store
59      *
60      * @param store
61      * @param refresher
62      */
63     void removeRefresher(DataStoreIdentifier store, DataRefresher refresher);
64
65
66     Registration<DataReader<InstanceIdentifier, CompositeNode>> registerConfigurationReader(InstanceIdentifier path, DataReader<InstanceIdentifier, CompositeNode> reader);
67
68     Registration<DataReader<InstanceIdentifier, CompositeNode>> registerOperationalReader(InstanceIdentifier path, DataReader<InstanceIdentifier, CompositeNode> reader);
69
70     public interface DataRefresher extends Provider.ProviderFunctionality {
71
72         /**
73          * Fired when some component explicitly requested the data refresh.
74          *
75          * The provider which exposed the {@link DataRefresher} should republish
76          * its provided data by editing the data in all affected data stores.
77          */
78         void refreshData();
79     }
80 }