Mechanical code cleanup (sal-binding-api)
[controller.git] / opendaylight / md-sal / sal-binding-api / src / main / java / org / opendaylight / controller / sal / binding / api / data / DataBrokerService.java
index 65f1ff2fe368ac07255d852e57c58ee2e5e1f610..d1f9d3eafefc3ea4991e2349054d2625ee487047 100644 (file)
@@ -7,8 +7,6 @@
  */
 package org.opendaylight.controller.sal.binding.api.data;
 
-import org.opendaylight.controller.md.sal.common.api.data.DataChangePublisher;
-import org.opendaylight.controller.md.sal.common.api.data.DataModificationTransactionFactory;
 import org.opendaylight.controller.md.sal.common.api.data.DataReader;
 import org.opendaylight.controller.sal.binding.api.BindingAwareService;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
@@ -21,45 +19,57 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
  *
  *
  * @see DataProviderService
+ * @deprecated Replaced by newer better documented version {@link org.opendaylight.controller.md.sal.binding.api.DataBroker}
  */
-public interface DataBrokerService extends //
-        BindingAwareService, //
-        DataModificationTransactionFactory<InstanceIdentifier<? extends DataObject>, DataObject>, //
-        DataReader<InstanceIdentifier<? extends DataObject>, DataObject>, //
-        DataChangePublisher<InstanceIdentifier<? extends DataObject>, DataObject, DataChangeListener> {
+@Deprecated
+public interface DataBrokerService extends BindingAwareService,
+        DataReader<InstanceIdentifier<? extends DataObject>, DataObject> {
     /**
      * Creates a data modification transaction.
      *
      * @return new blank data modification transaction.
+     * @deprecated Replaced by more specific transaction types. Please use
+     *          {@link org.opendaylight.controller.md.sal.binding.api.DataBroker#newReadOnlyTransaction(),
+     *          {@link org.opendaylight.controller.md.sal.binding.api.DataBroker#newReadWriteTransaction()
+     *          or
+     *          {@link org.opendaylight.controller.md.sal.binding.api.DataBroker#newWriteOnlyTransaction().
      */
-    @Override
-       DataModificationTransaction beginTransaction();
+    @Deprecated
+    DataModificationTransaction beginTransaction();
 
     /**
      * Reads data subtree from configurational store.
      * (Store which is populated by consumer, which is usually used to
-     * inject state into providers. E.g. Flow configuration)-
+     * inject state into providers. E.g. Flow configuration)
+     *
+     *
+     * @deprecated Please use {@link org.opendaylight.controller.md.sal.binding.api.DataBroker#newReadOnlyTransaction()}
      *
      */
     @Override
-    public DataObject readConfigurationData(InstanceIdentifier<? extends DataObject> path);
+    @Deprecated
+    DataObject readConfigurationData(InstanceIdentifier<? extends DataObject> path);
 
     /**
      * Reads data subtree from operational store.
      * (Store which is populated by providers, which is usually used to
      * capture state of providers. E.g. Topology)
      *
+     * @deprecated Please use {@link org.opendaylight.controller.md.sal.binding.api.DataBroker#newReadOnlyTransaction()}
      */
     @Override
-    public DataObject readOperationalData(InstanceIdentifier<? extends DataObject> path);
+    @Deprecated
+    DataObject readOperationalData(InstanceIdentifier<? extends DataObject> path);
 
     /**
      * Register a data change listener for particular subtree.
      *
      * Callback is invoked each time data in subtree changes.
      *
+     * @deprecated Please use {@link org.opendaylight.controller.md.sal.binding.api.DataBroker#registerDataChangeListener(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType, InstanceIdentifier, org.opendaylight.controller.md.sal.binding.api.DataChangeListener, org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker.DataChangeScope)}
+     * which provides more fine-grained registration options.
      */
-    @Override
-    public ListenerRegistration<DataChangeListener> registerDataChangeListener(
+    @Deprecated
+    ListenerRegistration<DataChangeListener> registerDataChangeListener(
             InstanceIdentifier<? extends DataObject> path, DataChangeListener listener);
 }