X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FSingleCommitCohortProxy.java;h=5e8a95405bbca97a152498f785871ed2db4dedf7;hp=033cbeaae7b43437cfd4b540207a4700d53fd266;hb=b65e66f7b1bafb0d0c5fbe1c569835eb890f672a;hpb=925cb4a228d0fda99c7bfeb432eb25285a223887 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/SingleCommitCohortProxy.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/SingleCommitCohortProxy.java index 033cbeaae7..5e8a95405b 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/SingleCommitCohortProxy.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/SingleCommitCohortProxy.java @@ -7,15 +7,16 @@ */ package org.opendaylight.controller.cluster.datastore; +import static java.util.Objects.requireNonNull; + import akka.dispatch.OnComplete; -import com.google.common.base.Preconditions; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; import java.util.Arrays; import java.util.List; import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier; -import org.opendaylight.controller.cluster.datastore.utils.ActorContext; -import org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCohort; +import org.opendaylight.controller.cluster.datastore.utils.ActorUtils; +import org.opendaylight.mdsal.dom.spi.store.DOMStoreThreePhaseCommitCohort; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import scala.concurrent.Future; @@ -30,17 +31,17 @@ import scala.concurrent.Future; class SingleCommitCohortProxy extends AbstractThreePhaseCommitCohort { private static final Logger LOG = LoggerFactory.getLogger(SingleCommitCohortProxy.class); - private final ActorContext actorContext; + private final ActorUtils actorUtils; private final Future cohortFuture; private final TransactionIdentifier transactionId; private volatile DOMStoreThreePhaseCommitCohort delegateCohort = NoOpDOMStoreThreePhaseCommitCohort.INSTANCE; private final OperationCallback.Reference operationCallbackRef; - SingleCommitCohortProxy(ActorContext actorContext, Future cohortFuture, TransactionIdentifier transactionId, + SingleCommitCohortProxy(ActorUtils actorUtils, Future cohortFuture, TransactionIdentifier transactionId, OperationCallback.Reference operationCallbackRef) { - this.actorContext = actorContext; + this.actorUtils = actorUtils; this.cohortFuture = cohortFuture; - this.transactionId = Preconditions.checkNotNull(transactionId); + this.transactionId = requireNonNull(transactionId); this.operationCallbackRef = operationCallbackRef; } @@ -70,7 +71,7 @@ class SingleCommitCohortProxy extends AbstractThreePhaseCommitCohort { // immediate success, to complete the 3PC for the front-end. returnFuture.set(Boolean.TRUE); } - }, actorContext.getClientDispatcher()); + }, actorUtils.getClientDispatcher()); return returnFuture; }