ILockingStorage

interface OCP\Files\Storage\ILockingStorage
Storage backends that require explicit locking
Storage backends implementing this interface do not need to implement their own locking implementation but should use the provided lockingprovider instead
The implementation of the locking methods only need to map internal storage paths to “lock keys”
Implemented by:OC\Files\Storage\Wrapper\Wrapper OC\Files\Storage\Common
Source:lib/public/Files/Storage/ILockingStorage.php#36

Methods

public OCP\Files\Storage\ILockingStorage::acquireLock($path, $type, $provider)
Source:

lib/public/Files/Storage/ILockingStorage.php#44

Parameters:
  • $path (string) The path of the file to acquire the lock for
  • $type (int) OCPLockILockingProvider::LOCK_SHARED or OCPLockILockingProvider::LOCK_EXCLUSIVE
  • $provider (OCP\Lock\ILockingProvider)
Throws:

\OCP\Lock\LockedException

Since:

9.0.0

public OCP\Files\Storage\ILockingStorage::releaseLock($path, $type, $provider)
Source:

lib/public/Files/Storage/ILockingStorage.php#53

Parameters:
  • $path (string) The path of the file to acquire the lock for
  • $type (int) OCPLockILockingProvider::LOCK_SHARED or OCPLockILockingProvider::LOCK_EXCLUSIVE
  • $provider (OCP\Lock\ILockingProvider)
Throws:

\OCP\Lock\LockedException

Since:

9.0.0

public OCP\Files\Storage\ILockingStorage::changeLock($path, $type, $provider)
Source:

lib/public/Files/Storage/ILockingStorage.php#62

Parameters:
  • $path (string) The path of the file to change the lock for
  • $type (int) OCPLockILockingProvider::LOCK_SHARED or OCPLockILockingProvider::LOCK_EXCLUSIVE
  • $provider (OCP\Lock\ILockingProvider)
Throws:

\OCP\Lock\LockedException

Since:

9.0.0