Change variables, methods, field names from transactionContextAdapter to transactionC...
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / AbstractTransactionContextFactory.java
index 19646f27fc9a1f42fbbd716dce0f0e721ad0ef0a..1e085523fdc0599e21a320e4d721abdba9bd13a1 100644 (file)
@@ -62,7 +62,7 @@ abstract class AbstractTransactionContextFactory<F extends LocalTransactionFacto
     }
 
     private void onFindPrimaryShardSuccess(PrimaryShardInfo primaryShardInfo, TransactionProxy parent,
-            String shardName, TransactionContextWrapper transactionContextAdapter) {
+            String shardName, TransactionContextWrapper transactionContextWrapper) {
         if(LOG.isDebugEnabled()) {
             LOG.debug("Tx {}: Found primary {} for shard {}", parent.getIdentifier(),
                     primaryShardInfo.getPrimaryShardActor(), shardName);
@@ -72,48 +72,48 @@ abstract class AbstractTransactionContextFactory<F extends LocalTransactionFacto
 
         TransactionContext localContext = maybeCreateLocalTransactionContext(parent, shardName);
         if(localContext != null) {
-            transactionContextAdapter.executePriorTransactionOperations(localContext);
+            transactionContextWrapper.executePriorTransactionOperations(localContext);
         } else {
-            RemoteTransactionContextSupport remote = new RemoteTransactionContextSupport(transactionContextAdapter,
+            RemoteTransactionContextSupport remote = new RemoteTransactionContextSupport(transactionContextWrapper,
                     parent, shardName);
             remote.setPrimaryShard(primaryShardInfo.getPrimaryShardActor(), primaryShardInfo.getPrimaryShardVersion());
         }
     }
 
     private void onFindPrimaryShardFailure(Throwable failure, TransactionProxy parent,
-            String shardName, TransactionContextWrapper transactionContextAdapter) {
+            String shardName, TransactionContextWrapper transactionContextWrapper) {
         LOG.debug("Tx {}: Find primary for shard {} failed", parent.getIdentifier(), shardName, failure);
 
-        transactionContextAdapter.executePriorTransactionOperations(new NoOpTransactionContext(failure,
+        transactionContextWrapper.executePriorTransactionOperations(new NoOpTransactionContext(failure,
                 parent.getIdentifier()));
     }
 
-    final TransactionContextWrapper newTransactionAdapter(final TransactionProxy parent, final String shardName) {
-        final TransactionContextWrapper transactionContextAdapter =
+    final TransactionContextWrapper newTransactionContextWrapper(final TransactionProxy parent, final String shardName) {
+        final TransactionContextWrapper transactionContextWrapper =
                 new TransactionContextWrapper(parent.getIdentifier(), actorContext);
 
         Future<PrimaryShardInfo> findPrimaryFuture = findPrimaryShard(shardName);
         if(findPrimaryFuture.isCompleted()) {
             Try<PrimaryShardInfo> maybe = findPrimaryFuture.value().get();
             if(maybe.isSuccess()) {
-                onFindPrimaryShardSuccess(maybe.get(), parent, shardName, transactionContextAdapter);
+                onFindPrimaryShardSuccess(maybe.get(), parent, shardName, transactionContextWrapper);
             } else {
-                onFindPrimaryShardFailure(maybe.failed().get(), parent, shardName, transactionContextAdapter);
+                onFindPrimaryShardFailure(maybe.failed().get(), parent, shardName, transactionContextWrapper);
             }
         } else {
             findPrimaryFuture.onComplete(new OnComplete<PrimaryShardInfo>() {
                 @Override
                 public void onComplete(final Throwable failure, final PrimaryShardInfo primaryShardInfo) {
                     if (failure == null) {
-                        onFindPrimaryShardSuccess(primaryShardInfo, parent, shardName, transactionContextAdapter);
+                        onFindPrimaryShardSuccess(primaryShardInfo, parent, shardName, transactionContextWrapper);
                     } else {
-                        onFindPrimaryShardFailure(failure, parent, shardName, transactionContextAdapter);
+                        onFindPrimaryShardFailure(failure, parent, shardName, transactionContextWrapper);
                     }
                 }
             }, actorContext.getClientDispatcher());
         }
 
-        return transactionContextAdapter;
+        return transactionContextWrapper;
     }
 
     private void updateShardInfo(final String shardName, final PrimaryShardInfo primaryShardInfo) {