Skip to content
Snippets Groups Projects
Commit f39c73c7 authored by Robin Appelman's avatar Robin Appelman Committed by Thomas Müller
Browse files

add phpdoc

parent cc7bd53d
No related branches found
No related tags found
No related merge requests found
...@@ -33,6 +33,13 @@ abstract class AbstractLockingProvider implements ILockingProvider { ...@@ -33,6 +33,13 @@ abstract class AbstractLockingProvider implements ILockingProvider {
'exclusive' => [] 'exclusive' => []
]; ];
/**
* Check if we've locally acquired a lock
*
* @param string $path
* @param int $type
* @return bool
*/
protected function hasAcquiredLock($path, $type) { protected function hasAcquiredLock($path, $type) {
if ($type === self::LOCK_SHARED) { if ($type === self::LOCK_SHARED) {
return isset($this->acquiredLocks['shared'][$path]) && $this->acquiredLocks['shared'][$path] > 0; return isset($this->acquiredLocks['shared'][$path]) && $this->acquiredLocks['shared'][$path] > 0;
......
...@@ -51,6 +51,12 @@ class DBLockingProvider extends AbstractLockingProvider { ...@@ -51,6 +51,12 @@ class DBLockingProvider extends AbstractLockingProvider {
const TTL = 3600; // how long until we clear stray locks in seconds 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) { protected function isLocallyLocked($path) {
return isset($this->sharedLocks[$path]) && $this->sharedLocks[$path]; return isset($this->sharedLocks[$path]) && $this->sharedLocks[$path];
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment