diff options
-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]; } |