1 package org.opendaylight.controller.sal.binding.impl;
3 import java.util.concurrent.ExecutorService;
4 import java.util.concurrent.Future;
5 import java.util.concurrent.atomic.AtomicLong;
7 import org.opendaylight.controller.md.sal.common.api.data.DataReader;
8 import org.opendaylight.controller.md.sal.common.impl.service.AbstractDataBroker;
9 import org.opendaylight.controller.sal.binding.api.data.DataChangeListener;
10 import org.opendaylight.controller.sal.binding.api.data.DataProviderService;
11 import org.opendaylight.controller.sal.binding.impl.util.BindingAwareDataReaderRouter;
12 import org.opendaylight.controller.sal.common.DataStoreIdentifier;
13 import org.opendaylight.yangtools.concepts.Registration;
14 import org.opendaylight.yangtools.yang.binding.DataObject;
15 import org.opendaylight.yangtools.yang.binding.DataRoot;
16 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
17 import org.opendaylight.yangtools.yang.common.RpcResult;
20 public class DataBrokerImpl extends AbstractDataBroker<InstanceIdentifier<? extends DataObject>, DataObject, DataChangeListener> implements
21 DataProviderService, AutoCloseable {
25 private final AtomicLong nextTransaction = new AtomicLong();
27 public DataBrokerImpl() {
28 setDataReadRouter(new BindingAwareDataReaderRouter());
32 public DataTransactionImpl beginTransaction() {
33 String transactionId = "BA-" + nextTransaction.getAndIncrement();
34 return new DataTransactionImpl(transactionId,this);
39 public <T extends DataRoot> T getData(DataStoreIdentifier store, Class<T> rootType) {
40 throw new UnsupportedOperationException("Deprecated");
45 public <T extends DataRoot> T getData(DataStoreIdentifier store, T filter) {
46 throw new UnsupportedOperationException("Deprecated");
51 public <T extends DataRoot> T getCandidateData(DataStoreIdentifier store, Class<T> rootType) {
52 throw new UnsupportedOperationException("Deprecated");
57 public <T extends DataRoot> T getCandidateData(DataStoreIdentifier store, T filter) {
58 throw new UnsupportedOperationException("Deprecated");
63 public RpcResult<DataRoot> editCandidateData(DataStoreIdentifier store, DataRoot changeSet) {
64 throw new UnsupportedOperationException("Deprecated");
69 public Future<RpcResult<Void>> commit(DataStoreIdentifier store) {
70 throw new UnsupportedOperationException("Deprecated");
75 public DataObject getData(InstanceIdentifier<? extends DataObject> data) {
76 throw new UnsupportedOperationException("Deprecated");
81 public DataObject getConfigurationData(InstanceIdentifier<?> data) {
82 throw new UnsupportedOperationException("Deprecated");
87 public void registerChangeListener(InstanceIdentifier<? extends DataObject> path, DataChangeListener changeListener) {
88 throw new UnsupportedOperationException("Deprecated");
93 public void unregisterChangeListener(InstanceIdentifier<? extends DataObject> path,
94 DataChangeListener changeListener) {
95 throw new UnsupportedOperationException("Deprecated");
99 public void close() throws Exception {