summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-10-20 16:09:04 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-10-21 09:43:30 +0200
commitf39c73c79c33c2e90dd277fd550075d0d80fc1e6 (patch)
tree13a21fe2963ee327578e36c4f90ad91a28200eff /lib/private
parentcc7bd53d1719d17a9fe222c2f4ed9e207d10c805 (diff)
downloadnextcloud-server-f39c73c79c33c2e90dd277fd550075d0d80fc1e6.tar.gz
nextcloud-server-f39c73c79c33c2e90dd277fd550075d0d80fc1e6.zip
add phpdoc
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/lock/abstractlockingprovider.php7
-rw-r--r--lib/private/lock/dblockingprovider.php6
2 files changed, 13 insertions, 0 deletions
diff --git a/lib/private/lock/abstractlockingprovider.php b/lib/private/lock/abstractlockingprovider.php
index ae0face325e..c7a29380efe 100644
--- a/lib/private/lock/abstractlockingprovider.php
+++ b/lib/private/lock/abstractlockingprovider.php
@@ -33,6 +33,13 @@ abstract class AbstractLockingProvider implements ILockingProvider {
'exclusive' => []
];
+ /**
+ * Check if we've locally acquired a lock
+ *
+ * @param string $path
+ * @param int $type
+ * @return bool
+ */
protected function hasAcquiredLock($path, $type) {
if ($type === self::LOCK_SHARED) {
return isset($this->acquiredLocks['shared'][$path]) && $this->acquiredLocks['shared'][$path] > 0;
diff --git a/lib/private/lock/dblockingprovider.php b/lib/private/lock/dblockingprovider.php
index c1f24a9c132..a167687e0ac 100644
--- a/lib/private/lock/dblockingprovider.php
+++ b/lib/private/lock/dblockingprovider.php
@@ -51,6 +51,12 @@ class DBLockingProvider extends AbstractLockingProvider {
const TTL = 3600; // how long until we clear stray locks in seconds
+ /**
+ * Check if we have an open shared lock for a path
+ *
+ * @param string $path
+ * @return bool
+ */
protected function isLocallyLocked($path) {
return isset($this->sharedLocks[$path]) && $this->sharedLocks[$path];
}