Improve LocalProxyTransaction.doExists()
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / TransactionContextFactory.java
index 56e8e6e70b049d03dc45fe2af3d84fb578075d20..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.cluster.datastore.utils.ActorUtils;
 import org.opendaylight.mdsal.dom.spi.store.DOMStoreTransactionChain;
-import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree;
+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
@@ -36,13 +36,13 @@ final class TransactionContextFactory extends AbstractTransactionContextFactory<
 
     @Override
     protected LocalTransactionFactoryImpl factoryForShard(final String shardName, final ActorSelection shardLeader,
-            final DataTree dataTree) {
-        return new LocalTransactionFactoryImpl(getActorContext(), shardLeader, dataTree);
+            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