2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.controller.sal.binding.api.data;
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;
19 * DataBrokerService provides unified access to the data stores available in the
23 * @see DataProviderService
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> {
31 * Creates a data modification transaction.
33 * @return new blank data modification transaction.
36 DataModificationTransaction beginTransaction();
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)-
45 public DataObject readConfigurationData(InstanceIdentifier<? extends DataObject> path);
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)
54 public DataObject readOperationalData(InstanceIdentifier<? extends DataObject> path);
57 * Register a data change listener for particular subtree.
59 * Callback is invoked each time data in subtree changes.
63 public ListenerRegistration<DataChangeListener> registerDataChangeListener(
64 InstanceIdentifier<? extends DataObject> path, DataChangeListener listener);