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=6a542002d0a4293464edbca7e0f25fb83d17b0a7;hp=bc6e5f229fe04aacffd8e719c138ba394b27bbd8;hb=4379f102fa0c85abf58f60d81fec9c698582fb1a;hpb=2bfa2e8e41e625006069e631b08a668c86b1ba75 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 bc6e5f229f..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 @@ -32,4 +32,24 @@ interface TransactionContext { void readData(final YangInstanceIdentifier path, SettableFuture>> proxyFuture); void dataExists(YangInstanceIdentifier path, SettableFuture proxyFuture); + + 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(); }