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%2FLocalThreePhaseCommitCohort.java;h=4e085399d2093d2bc84661e1d6f8679fd73f59a1;hb=9e7a9b3725ad25f9adf85f0ad796b7cf748795a4;hp=267513fc2f1264943f82c5da11d2363dd18cbd5e;hpb=b2af021ee27b2977961f0fec6f8bb1a4acbcdbd7;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/LocalThreePhaseCommitCohort.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/LocalThreePhaseCommitCohort.java index 267513fc2f..4e085399d2 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/LocalThreePhaseCommitCohort.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/LocalThreePhaseCommitCohort.java @@ -11,6 +11,7 @@ import akka.actor.ActorSelection; import akka.dispatch.OnComplete; import com.google.common.base.Preconditions; import com.google.common.util.concurrent.ListenableFuture; +import javax.annotation.Nonnull; import org.opendaylight.controller.cluster.datastore.identifiers.TransactionIdentifier; import org.opendaylight.controller.cluster.datastore.messages.CommitTransactionReply; import org.opendaylight.controller.cluster.datastore.messages.ReadyLocalTransaction; @@ -51,6 +52,15 @@ abstract class LocalThreePhaseCommitCohort implements DOMStoreThreePhaseCommitCo return actorContext.executeOperationAsync(leader, message, actorContext.getTransactionCommitOperationTimeout()); } + /** + * Return the {@link ActorContext} associated with this object. + * + * @return An actor context instance. + */ + @Nonnull ActorContext getActorContext() { + return actorContext; + } + Future initiateCoordinatedCommit() { final Future messageFuture = initiateCommit(false); final Future ret = TransactionReadyReplyMapper.transform(messageFuture, actorContext,