+ /**
+ * Acquire a named lock, flush any transaction, and return an RAII style unlocker object
+ *
+ * This is suitiable for transactions that need to be serialized using cooperative locks,
+ * where each transaction can see each others' changes. Any transaction is flushed to clear
+ * out stale REPEATABLE-READ snapshot data. Once the returned object falls out of PHP scope,
+ * any transaction will be committed and the lock will be released.
+ *
+ * If the lock acquisition failed, then no transaction flush happens, and null is returned.
+ *
+ * @param string $lockKey Name of lock to release
+ * @param string $fname Name of the calling method
+ * @param int $timeout Acquisition timeout in seconds
+ * @return ScopedCallback|null
+ * @throws DBUnexpectedError
+ * @since 1.27
+ */
+ public function getScopedLockAndFlush( $lockKey, $fname, $timeout );
+