ILockingProvider

interface OCP\Lock\ILockingProvider
Interface ILockingProvider
Implemented by:OC\Lock\NoopLockingProvider OC\Lock\AbstractLockingProvider
Source:lib/public/Lock/ILockingProvider.php#36

Constants

LOCK_SHARED = 1
Source:lib/public/Lock/ILockingProvider.php#40
Since:8.1.0
LOCK_EXCLUSIVE = 2
Source:lib/public/Lock/ILockingProvider.php#44
Since:8.1.0

Methods

public OCP\Lock\ILockingProvider::isLocked($path, $type)
Source:

lib/public/Lock/ILockingProvider.php#52

Parameters:
  • $path (string)
  • $type (int) self::LOCK_SHARED or self::LOCK_EXCLUSIVE
Returns:

bool

Since:

8.1.0

public OCP\Lock\ILockingProvider::acquireLock($path, $type, $readablePath=null)
Source:

lib/public/Lock/ILockingProvider.php#61

Parameters:
  • $path (string)
  • $type (int) self::LOCK_SHARED or self::LOCK_EXCLUSIVE
  • $readablePath (string) human readable path to use in error messages, since 20.0.0
Throws:

\OCP\Lock\LockedException

Since:

8.1.0

public OCP\Lock\ILockingProvider::releaseLock($path, $type)
Source:

lib/public/Lock/ILockingProvider.php#68

Parameters:
  • $path (string)
  • $type (int) self::LOCK_SHARED or self::LOCK_EXCLUSIVE
Since:

8.1.0

public OCP\Lock\ILockingProvider::changeLock($path, $targetType)
Change the type of an existing lock
Source:

lib/public/Lock/ILockingProvider.php#78

Parameters:
  • $path (string)
  • $targetType (int) self::LOCK_SHARED or self::LOCK_EXCLUSIVE
Throws:

\OCP\Lock\LockedException

Since:

8.1.0

public OCP\Lock\ILockingProvider::releaseAll()
release all lock acquired by this instance
Source:lib/public/Lock/ILockingProvider.php#84
Since:8.1.0