diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-10-20 16:09:04 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-21 09:43:30 +0200 |
commit | f39c73c79c33c2e90dd277fd550075d0d80fc1e6 (patch) | |
tree | 13a21fe2963ee327578e36c4f90ad91a28200eff /lib/private | |
parent | cc7bd53d1719d17a9fe222c2f4ed9e207d10c805 (diff) | |
download | nextcloud-server-f39c73c79c33c2e90dd277fd550075d0d80fc1e6.tar.gz nextcloud-server-f39c73c79c33c2e90dd277fd550075d0d80fc1e6.zip |
add phpdoc
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/lock/abstractlockingprovider.php | 7 | ||||
-rw-r--r-- | lib/private/lock/dblockingprovider.php | 6 |
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]; } |