d0225768b4e2500acf0eccfb13e4999e0a8591e3
[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  */
25 public interface DataBrokerService extends //
26         BindingAwareService, //
27         DataModificationTransactionFactory<InstanceIdentifier<? extends DataObject>, DataObject>, //
28         DataReader<InstanceIdentifier<? extends DataObject>, DataObject>, //
29         DataChangePublisher<InstanceIdentifier<? extends DataObject>, DataObject, DataChangeListener> {
30     /**
31      * Creates a data modification transaction.
32      *
33      * @return new blank data modification transaction.
34      */
35     @Override
36     DataModificationTransaction beginTransaction();
37
38     /**
39      * Reads data subtree from configurational store.
40      * (Store which is populated by consumer, which is usually used to
41      * inject state into providers. E.g. Flow configuration)-
42      *
43      */
44     @Override
45     public DataObject readConfigurationData(InstanceIdentifier<? extends DataObject> path);
46
47     /**
48      * Reads data subtree from operational store.
49      * (Store which is populated by providers, which is usually used to
50      * capture state of providers. E.g. Topology)
51      *
52      */
53     @Override
54     public DataObject readOperationalData(InstanceIdentifier<? extends DataObject> path);
55
56     /**
57      * Register a data change listener for particular subtree.
58      *
59      * Callback is invoked each time data in subtree changes.
60      *
61      */
62     @Override
63     public ListenerRegistration<DataChangeListener> registerDataChangeListener(
64             InstanceIdentifier<? extends DataObject> path, DataChangeListener listener);
65 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.