summaryrefslogtreecommitdiffstats
path: root/lib/public/iconfig.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2014-12-03 21:31:29 +0100
committerMorris Jobke <hey@morrisjobke.de>2014-12-08 22:33:36 +0100
commitaf91ee97c981d32bcd531e71d31e16f1232c44ce (patch)
treea38253e8311aa0056f90af6adc89d9b791d1dc00 /lib/public/iconfig.php
parentf0b10324caf1637d8ad5a9ed94dfed084f65407d (diff)
downloadnextcloud-server-af91ee97c981d32bcd531e71d31e16f1232c44ce.tar.gz
nextcloud-server-af91ee97c981d32bcd531e71d31e16f1232c44ce.zip
introduce preCondition for setUserValue to provide atomic check-and-update
Diffstat (limited to 'lib/public/iconfig.php')
-rw-r--r--lib/public/iconfig.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/public/iconfig.php b/lib/public/iconfig.php
index 1d3502ffb4c..fe0f1273a80 100644
--- a/lib/public/iconfig.php
+++ b/lib/public/iconfig.php
@@ -109,8 +109,10 @@ interface IConfig {
* @param string $appName the appName that we want to store the value under
* @param string $key the key under which the value is being stored
* @param string $value the value that you want to store
+ * @param string $preCondition only update if the config value was previously the value passed as $preCondition
+ * @throws \OCP\PreConditionNotMetException if a precondition is specified and is not met
*/
- public function setUserValue($userId, $appName, $key, $value);
+ public function setUserValue($userId, $appName, $key, $value, $preCondition = null);
/**
* Shortcut for getting a user defined value