Deprecate old MD-SAL APIs for removal
[controller.git] / opendaylight / md-sal / sal-binding-api / src / main / java / org / opendaylight / controller / md / sal / binding / api / ForwardingDataBroker.java
1 /*
2  * Copyright (c) 2017 Red Hat, 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.md.sal.binding.api;
9
10 import com.google.common.collect.ForwardingObject;
11 import org.eclipse.jdt.annotation.NonNull;
12 import org.opendaylight.controller.md.sal.common.api.data.TransactionChainListener;
13 import org.opendaylight.yangtools.concepts.ListenerRegistration;
14 import org.opendaylight.yangtools.yang.binding.DataObject;
15
16 /**
17  * Utility {@link DataBroker} implementation which forwards all interface method
18  * invocation to a delegate instance.
19  *
20  * @deprecated Use org.opendaylight.mdsal.binding.spi.ForwardingDataBroker instead.
21  */
22 @Deprecated(forRemoval = true)
23 public abstract class ForwardingDataBroker extends ForwardingObject implements DataBroker {
24
25     @Override
26     protected abstract @NonNull DataBroker delegate();
27
28     @Override
29     public ReadOnlyTransaction newReadOnlyTransaction() {
30         return delegate().newReadOnlyTransaction();
31     }
32
33     @Override
34     public ReadWriteTransaction newReadWriteTransaction() {
35         return delegate().newReadWriteTransaction();
36     }
37
38     @Override
39     public WriteTransaction newWriteOnlyTransaction() {
40         return delegate().newWriteOnlyTransaction();
41     }
42
43     @Override
44     public <T extends DataObject, L extends DataTreeChangeListener<T>> ListenerRegistration<L>
45             registerDataTreeChangeListener(DataTreeIdentifier<T> treeId, L listener) {
46         return delegate().registerDataTreeChangeListener(treeId, listener);
47     }
48
49     @Override
50     public BindingTransactionChain createTransactionChain(TransactionChainListener listener) {
51         return delegate().createTransactionChain(listener);
52     }
53
54 }

©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.