DBLockingProvider¶
-
class
OC\Lock\
DBLockingProvider
¶ - Locking provider that stores the locks in the database
Source: lib/private/Lock/DBLockingProvider.php#42 Parent: OC\Lock\AbstractLockingProvider
Properties¶
Methods¶
-
protected
OC\Lock\DBLockingProvider::
isLocallyLocked
($path)¶ - Check if we have an open shared lock for a path
Source: Parameters: - $path (string)
Returns: bool
-
protected
OC\Lock\DBLockingProvider::
markAcquire
($path, $type)¶ - Mark a locally acquired lock
Source: Parameters: - $path (string)
- $type (int) self::LOCK_SHARED or self::LOCK_EXCLUSIVE
-
protected
OC\Lock\DBLockingProvider::
markChange
($path, $targetType)¶ - Change the type of an existing tracked lock
Source: Parameters: - $path (string)
- $targetType (int) self::LOCK_SHARED or self::LOCK_EXCLUSIVE
-
public
OC\Lock\DBLockingProvider::
__construct
($connection, $logger, $timeFactory, $ttl=3600, $cacheSharedLocks=true)¶ Source: Parameters: - $connection (
OCP\IDBConnection
) - $logger (
OCP\ILogger
) - $timeFactory (
OCP\AppFramework\Utility\ITimeFactory
) - $ttl (int)
- $cacheSharedLocks (bool)
- $connection (
-
protected
OC\Lock\DBLockingProvider::
initLockField
($path, $lock=0)¶ - Insert a file locking row if it does not exists.
Source: Parameters: - $path (string)
- $lock (int)
Returns: int number of inserted rows
-
protected
OC\Lock\DBLockingProvider::
getExpireTime
()¶ Source: lib/private/Lock/DBLockingProvider.php#147 Returns: int
-
public
OC\Lock\DBLockingProvider::
isLocked
($path, $type)¶ Source: Parameters: - $path (string)
- $type (int) self::LOCK_SHARED or self::LOCK_EXCLUSIVE
Returns: bool
-
public
OC\Lock\DBLockingProvider::
acquireLock
($path, $type, $readablePath=null)¶ Source: Parameters: - $path (string)
- $type (int) self::LOCK_SHARED or self::LOCK_EXCLUSIVE
Throws:
-
public
OC\Lock\DBLockingProvider::
releaseLock
($path, $type)¶ Source: Parameters: - $path (string)
- $type (int) self::LOCK_SHARED or self::LOCK_EXCLUSIVE
-
public
OC\Lock\DBLockingProvider::
changeLock
($path, $targetType)¶ - Change the type of an existing lock
Source: Parameters: - $path (string)
- $targetType (int) self::LOCK_SHARED or self::LOCK_EXCLUSIVE
Throws:
-
public
OC\Lock\DBLockingProvider::
cleanExpiredLocks
()¶ - cleanup empty locks
Source: lib/private/Lock/DBLockingProvider.php#271
-
public
OC\Lock\DBLockingProvider::
releaseAll
()¶ - release all lock acquired by this instance which were marked using the mark* methods
Source: lib/private/Lock/DBLockingProvider.php#289