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%2FTransactionContext.java;h=6a542002d0a4293464edbca7e0f25fb83d17b0a7;hb=87c8362c7501408b281f5ddc9b78ed7440280fa1;hp=a5a7494e1a0930d6dab535b920198a1d4773f8a5;hpb=59e84273be97b1115fb3fb0f06364b7491a40385;p=controller.git 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 a5a7494e1a..6a542002d0 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 @@ -10,7 +10,6 @@ package org.opendaylight.controller.cluster.datastore; import akka.actor.ActorSelection; import com.google.common.base.Optional; import com.google.common.util.concurrent.SettableFuture; -import java.util.Collection; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; import scala.concurrent.Future; @@ -34,5 +33,23 @@ interface TransactionContext { void dataExists(YangInstanceIdentifier path, SettableFuture proxyFuture); - void copyRecordedOperationFutures(Collection> target); + boolean supportsDirectCommit(); + + Future directCommit(); + + /** + * 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 + */ + boolean usesOperationLimiting(); }