Move operation limiter down to TransactionContextWrapper
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / LocalThreePhaseCommitCohort.java
index 267513fc2f1264943f82c5da11d2363dd18cbd5e..4e085399d2093d2bc84661e1d6f8679fd73f59a1 100644 (file)
@@ -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<ActorSelection> initiateCoordinatedCommit() {
         final Future<Object> messageFuture = initiateCommit(false);
         final Future<ActorSelection> ret = TransactionReadyReplyMapper.transform(messageFuture, actorContext,