summaryrefslogtreecommitdiffstats
path: root/lib/private/files/storage/storage.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-05-04 14:21:34 +0200
committerRobin Appelman <icewind@owncloud.com>2015-06-01 13:22:56 +0200
commit536e187e5125aefec75037648181afc42df2a9d0 (patch)
tree95ff2087cdca7dfeaef2cf9d6c260ce1e1bd8ff3 /lib/private/files/storage/storage.php
parentcdf7f91259d5e0e261832d0edffadf3760575223 (diff)
downloadnextcloud-server-536e187e5125aefec75037648181afc42df2a9d0.tar.gz
nextcloud-server-536e187e5125aefec75037648181afc42df2a9d0.zip
add locking to the storage api
Diffstat (limited to 'lib/private/files/storage/storage.php')
-rw-r--r--lib/private/files/storage/storage.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/private/files/storage/storage.php b/lib/private/files/storage/storage.php
index 07b5633c908..8b34908e610 100644
--- a/lib/private/files/storage/storage.php
+++ b/lib/private/files/storage/storage.php
@@ -21,6 +21,7 @@
*/
namespace OC\Files\Storage;
+use OCP\Lock\ILockingProvider;
/**
* Provide a common interface to all different storage options
@@ -76,4 +77,18 @@ interface Storage extends \OCP\Files\Storage {
*/
public function getMetaData($path);
+ /**
+ * @param string $path
+ * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
+ * @param \OCP\Lock\ILockingProvider $provider
+ * @throws \OCP\Lock\LockedException
+ */
+ public function acquireLock($path, $type, ILockingProvider $provider);
+
+ /**
+ * @param string $path
+ * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
+ * @param \OCP\Lock\ILockingProvider $provider
+ */
+ public function releaseLock($path, $type, ILockingProvider $provider);
}