BUG-5280: switch transaction IDs from String to TransactionIdentifier
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / RemoteTransactionContextSupport.java
index 4f41d8902e029dc97b99b9cb385e47682e076f7b..2924eaab574f2e3bb95b30877d7bef2328a0d6cf 100644 (file)
@@ -21,7 +21,6 @@ import org.opendaylight.controller.cluster.datastore.messages.CreateTransaction;
 import org.opendaylight.controller.cluster.datastore.messages.CreateTransactionReply;
 import org.opendaylight.controller.cluster.datastore.messages.PrimaryShardInfo;
 import org.opendaylight.controller.cluster.datastore.utils.ActorContext;
 import org.opendaylight.controller.cluster.datastore.messages.CreateTransactionReply;
 import org.opendaylight.controller.cluster.datastore.messages.PrimaryShardInfo;
 import org.opendaylight.controller.cluster.datastore.utils.ActorContext;
-import org.opendaylight.controller.cluster.datastore.utils.TransactionIdentifierUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import scala.concurrent.Future;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import scala.concurrent.Future;
@@ -118,16 +117,7 @@ final class RemoteTransactionContextSupport {
     }
 
     /**
     }
 
     /**
-     * @deprecated Temporary utility for extracting transaction chain ID from a {@link TransactionIdentifier}
-     */
-    @Deprecated
-    static String compatTransactionChainId(final TransactionIdentifier txId) {
-        final long historyId = txId.getHistoryId().getHistoryId();
-        return historyId == 0 ? "" : Long.toUnsignedString(historyId);
-    }
-
-    /**
-     * Performs a CreateTransaction try async.
+      Performs a CreateTransaction try async.
      */
     private void tryCreateTransaction() {
         if(LOG.isDebugEnabled()) {
      */
     private void tryCreateTransaction() {
         if(LOG.isDebugEnabled()) {
@@ -135,8 +125,7 @@ final class RemoteTransactionContextSupport {
                     primaryShardInfo.getPrimaryShardActor());
         }
 
                     primaryShardInfo.getPrimaryShardActor());
         }
 
-        Object serializedCreateMessage = new CreateTransaction(TransactionIdentifierUtils.actorNameFor(getIdentifier()),
-                getTransactionType().ordinal(), compatTransactionChainId(getIdentifier()),
+        Object serializedCreateMessage = new CreateTransaction(getIdentifier(), getTransactionType().ordinal(),
                     primaryShardInfo.getPrimaryShardVersion()).toSerializable();
 
         Future<Object> createTxFuture = getActorContext().executeOperationAsync(
                     primaryShardInfo.getPrimaryShardVersion()).toSerializable();
 
         Future<Object> createTxFuture = getActorContext().executeOperationAsync(