BUG-5626: remove createTypedTransactionActor() 89/38989/5
authorRobert Varga <rovarga@cisco.com>
Tue, 17 May 2016 13:49:11 +0000 (15:49 +0200)
committerTony Tkacik <ttkacik@cisco.com>
Fri, 20 May 2016 08:36:22 +0000 (08:36 +0000)
This method has only a single internal caller, inline it for clarity.

Change-Id: I136274b2375b4bb91f35d21dd5d8a206d1272867
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/Shard.java

index 94753e5..2251944 100644 (file)
@@ -587,13 +587,6 @@ public class Shard extends RaftActor {
         store.closeTransactionChain(closeTransactionChain.getTransactionChainId());
     }
 
-    private ActorRef createTypedTransactionActor(int transactionType,
-            ShardTransactionIdentifier transactionId, String transactionChainId) {
-
-        return transactionActorFactory.newShardTransaction(TransactionType.fromInt(transactionType),
-                transactionId, transactionChainId);
-    }
-
     private void createTransaction(CreateTransaction createTransaction) {
         try {
             if(TransactionType.fromInt(createTransaction.getTransactionType()) != TransactionType.READ_ONLY &&
@@ -611,20 +604,11 @@ public class Shard extends RaftActor {
         }
     }
 
-    private ActorRef createTransaction(int transactionType, String remoteTransactionId,
-            String transactionChainId) {
-
-
+    private ActorRef createTransaction(int transactionType, String remoteTransactionId, String transactionChainId) {
         ShardTransactionIdentifier transactionId = new ShardTransactionIdentifier(remoteTransactionId);
-
-        if(LOG.isDebugEnabled()) {
-            LOG.debug("{}: Creating transaction : {} ", persistenceId(), transactionId);
-        }
-
-        ActorRef transactionActor = createTypedTransactionActor(transactionType, transactionId,
-                transactionChainId);
-
-        return transactionActor;
+        LOG.debug("{}: Creating transaction : {} ", persistenceId(), transactionId);
+        return transactionActorFactory.newShardTransaction(TransactionType.fromInt(transactionType),
+            transactionId, transactionChainId);
     }
 
     private void commitWithNewTransaction(final Modification modification) {