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%2FTransactionContext.java;h=fe36661e671032d82caf8579967efa92e84b9513;hp=765d5bb7eccb1e01ad320fa9b37a48673d9c1e24;hb=5b69c8e66b12a29a36457955cac4a45affd7c73f;hpb=40173010bbe30f908688c3a4e0818c26c8cd4ded diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionContext.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionContext.java index 765d5bb7ec..fe36661e67 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionContext.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionContext.java @@ -9,8 +9,11 @@ package org.opendaylight.controller.cluster.datastore; import akka.actor.ActorSelection; import com.google.common.util.concurrent.SettableFuture; +import java.util.Optional; +import java.util.SortedSet; import org.opendaylight.controller.cluster.datastore.messages.AbstractRead; -import org.opendaylight.controller.cluster.datastore.modification.AbstractModification; +import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; +import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; import scala.concurrent.Future; /* @@ -20,27 +23,33 @@ import scala.concurrent.Future; interface TransactionContext { void closeTransaction(); - Future readyTransaction(); + Future readyTransaction(Boolean havePermit, Optional> participatingShardNames); - void executeModification(AbstractModification modification); + void executeRead(AbstractRead readCmd, SettableFuture promise, Boolean havePermit); - void executeRead(AbstractRead readCmd, SettableFuture promise); + void executeDelete(YangInstanceIdentifier path, Boolean havePermit); - Future directCommit(); + void executeMerge(YangInstanceIdentifier path, NormalizedNode data, Boolean havePermit); + + void executeWrite(YangInstanceIdentifier path, NormalizedNode data, Boolean havePermit); + + Future directCommit(Boolean havePermit); /** * Invoked by {@link TransactionContextWrapper} when it has finished handing * off operations to this context. From this point on, the context is responsible * for throttling operations. * + *

* Implementations can rely on the wrapper calling this operation in a synchronized * block, so they do not need to ensure visibility of this state transition themselves. */ void operationHandOffComplete(); /** - * A TransactionContext that uses Operation limiting should return true else false - * @return + * A TransactionContext that uses operation limiting should return true else false. + * + * @return true if operation limiting is used, false otherwise */ boolean usesOperationLimiting();