Deprecate DOMDataTreeProducer-related classes
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / databroker / actors / dds / ClientTransaction.java
index 9c0983879a799576cde9ec37ea154e9d54392bc6..5a28e692aaadfb4f04a9ea41f88690df6fe6b2ee 100644 (file)
@@ -13,7 +13,7 @@ import com.google.common.collect.Iterables;
 import com.google.common.util.concurrent.FluentFuture;
 import java.util.Collection;
 import java.util.Optional;
-import javax.annotation.Nonnull;
+import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeCursor;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeWriteCursor;
@@ -60,14 +60,11 @@ public class ClientTransaction extends AbstractClientHandle<AbstractProxyTransac
         super(parent, transactionId);
     }
 
-    private AbstractProxyTransaction createProxy(final Long shard) {
-        return parent().createTransactionProxy(getIdentifier(), shard);
-    }
-
     private AbstractProxyTransaction ensureTransactionProxy(final YangInstanceIdentifier path) {
-        return ensureProxy(path, this::createProxy);
+        return ensureProxy(path);
     }
 
+    @Deprecated(forRemoval = true)
     public DOMDataTreeWriteCursor openCursor() {
         Preconditions.checkState(cursor == null, "Transaction %s has open cursor", getIdentifier());
         cursor = new ClientTransactionCursor(this);
@@ -116,7 +113,12 @@ public class ClientTransaction extends AbstractClientHandle<AbstractProxyTransac
         return parent().onTransactionReady(this, cohort);
     }
 
-    void closeCursor(@Nonnull final DOMDataTreeCursor cursorToClose) {
+    @Override
+    final AbstractProxyTransaction createProxy(final Long shard) {
+        return parent().createTransactionProxy(getIdentifier(), shard);
+    }
+
+    void closeCursor(final @NonNull DOMDataTreeCursor cursorToClose) {
         if (cursorToClose.equals(this.cursor)) {
             this.cursor = null;
         }