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=505c959337840dfc9d75de1178d3d08c27af02a2;hp=9c17bc1a476c3c95060498656df9061a8312bcab;hb=c796596b5c46b5203c30b143e6282662e66c5642;hpb=93e6f3bfc003d4ce2d968761dff963615a0b799d 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 9c17bc1a47..505c959337 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 @@ -8,10 +8,12 @@ package org.opendaylight.controller.cluster.datastore; 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.slf4j.Logger; @@ -30,15 +32,15 @@ class SingleCommitCohortProxy extends AbstractThreePhaseCommitCohort { private final ActorContext actorContext; private final Future cohortFuture; - private final String transactionId; + private final TransactionIdentifier transactionId; private volatile DOMStoreThreePhaseCommitCohort delegateCohort = NoOpDOMStoreThreePhaseCommitCohort.INSTANCE; private final OperationCallback.Reference operationCallbackRef; - SingleCommitCohortProxy(ActorContext actorContext, Future cohortFuture, String transactionId, + SingleCommitCohortProxy(ActorContext actorContext, Future cohortFuture, TransactionIdentifier transactionId, OperationCallback.Reference operationCallbackRef) { this.actorContext = actorContext; this.cohortFuture = cohortFuture; - this.transactionId = transactionId; + this.transactionId = Preconditions.checkNotNull(transactionId); this.operationCallbackRef = operationCallbackRef; }