X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FAbstractTransactionContextFactory.java;h=bc1040509f173cfd889cdb5cd065adaa94978186;hb=e84f63ee098fff5b02cbce1281ca0d1208f966fa;hp=211ebec63c3074e9199d9c034290928495451b91;hpb=3404a29b4ee3b146a5ff98889bcf1afdebb65c3f;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractTransactionContextFactory.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractTransactionContextFactory.java index 211ebec63c..bc1040509f 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractTransactionContextFactory.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractTransactionContextFactory.java @@ -24,7 +24,7 @@ import org.opendaylight.controller.cluster.datastore.utils.ActorUtils; import org.opendaylight.mdsal.dom.spi.store.DOMStoreReadTransaction; import org.opendaylight.mdsal.dom.spi.store.DOMStoreReadWriteTransaction; import org.opendaylight.mdsal.dom.spi.store.DOMStoreWriteTransaction; -import org.opendaylight.yangtools.yang.data.api.schema.tree.ReadOnlyDataTree; +import org.opendaylight.yangtools.yang.data.tree.api.ReadOnlyDataTree; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import scala.concurrent.Future; @@ -41,8 +41,8 @@ abstract class AbstractTransactionContextFactory knownLocal = new ConcurrentHashMap<>(); - private final LocalHistoryIdentifier historyId; - private final ActorUtils actorUtils; + private final @NonNull LocalHistoryIdentifier historyId; + private final @NonNull ActorUtils actorUtils; // Used via TX_COUNTER_UPDATER @SuppressWarnings("unused") @@ -94,14 +94,14 @@ abstract class AbstractTransactionContextFactory maybe = findPrimaryFuture.value().get(); if (maybe.isSuccess()) { - return maybeCreateDirectTransactionContextWrapper(maybe.get(), parent, shardName, - contextWrapper); - } else { - onFindPrimaryShardFailure(maybe.failed().get(), parent, shardName, - contextWrapper); + return maybeCreateDirectTransactionContextWrapper(maybe.get(), parent, shardName, contextWrapper); } + + onFindPrimaryShardFailure(maybe.failed().get(), parent, shardName, contextWrapper); } else { - findPrimaryFuture.onComplete((result) -> { + findPrimaryFuture.onComplete(result -> { if (result.isSuccess()) { onFindPrimaryShardSuccess(result.get(), parent, shardName, contextWrapper); } else { @@ -240,12 +238,12 @@ abstract class AbstractTransactionContextFactory