Improve LocalProxyTransaction.doExists()
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / TransactionContextFactory.java
index 8c4f6b3456c63a8db9697cf1c9a277dbae9eb01b..34770245e7fe4884969014d4062c712724bcb676 100644 (file)
@@ -14,9 +14,9 @@ import org.opendaylight.controller.cluster.access.concepts.ClientIdentifier;
 import org.opendaylight.controller.cluster.access.concepts.LocalHistoryIdentifier;
 import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
 import org.opendaylight.controller.cluster.datastore.messages.PrimaryShardInfo;
-import org.opendaylight.controller.cluster.datastore.utils.ActorContext;
-import org.opendaylight.controller.sal.core.spi.data.DOMStoreTransactionChain;
-import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree;
+import org.opendaylight.controller.cluster.datastore.utils.ActorUtils;
+import org.opendaylight.mdsal.dom.spi.store.DOMStoreTransactionChain;
+import org.opendaylight.yangtools.yang.data.tree.api.ReadOnlyDataTree;
 import scala.concurrent.Future;
 
 /**
@@ -26,8 +26,8 @@ import scala.concurrent.Future;
 final class TransactionContextFactory extends AbstractTransactionContextFactory<LocalTransactionFactoryImpl> {
     private final AtomicLong nextHistory = new AtomicLong(1);
 
-    TransactionContextFactory(final ActorContext actorContext, final ClientIdentifier clientId) {
-        super(actorContext, new LocalHistoryIdentifier(clientId, 0));
+    TransactionContextFactory(final ActorUtils actorUtils, final ClientIdentifier clientId) {
+        super(actorUtils, new LocalHistoryIdentifier(clientId, 0));
     }
 
     @Override
@@ -35,17 +35,19 @@ final class TransactionContextFactory extends AbstractTransactionContextFactory<
     }
 
     @Override
-    protected LocalTransactionFactoryImpl factoryForShard(final String shardName, final ActorSelection shardLeader, final DataTree dataTree) {
-        return new LocalTransactionFactoryImpl(getActorContext(), shardLeader, dataTree);
+    protected LocalTransactionFactoryImpl factoryForShard(final String shardName, final ActorSelection shardLeader,
+            final ReadOnlyDataTree dataTree) {
+        return new LocalTransactionFactoryImpl(getActorUtils(), shardLeader, dataTree);
     }
 
     @Override
-    protected Future<PrimaryShardInfo> findPrimaryShard(final String shardName, TransactionIdentifier txId) {
-        return getActorContext().findPrimaryShardAsync(shardName);
+    protected Future<PrimaryShardInfo> findPrimaryShard(final String shardName, final TransactionIdentifier txId) {
+        return getActorUtils().findPrimaryShardAsync(shardName);
     }
 
     @Override
-    protected <T> void onTransactionReady(final TransactionIdentifier transaction, final Collection<Future<T>> cohortFutures) {
+    protected <T> void onTransactionReady(final TransactionIdentifier transaction,
+            final Collection<Future<T>> cohortFutures) {
         // Transactions are disconnected, this is a no-op
     }