Nextcloud PHP API (master)

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"

Tags
since
9.0.0

Table of Contents

Methods

acquireLock()  : mixed
changeLock()  : mixed
releaseLock()  : mixed

Methods

acquireLock()

public acquireLock(string $path, int $type, ILockingProvider $provider) : mixed
Parameters
$path : string

The path of the file to acquire the lock for

$type : int

\OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE

$provider : ILockingProvider
Tags
throws
LockedException
since
9.0.0

changeLock()

public changeLock(string $path, int $type, ILockingProvider $provider) : mixed
Parameters
$path : string

The path of the file to change the lock for

$type : int

\OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE

$provider : ILockingProvider
Tags
throws
LockedException
since
9.0.0

releaseLock()

public releaseLock(string $path, int $type, ILockingProvider $provider) : mixed
Parameters
$path : string

The path of the file to acquire the lock for

$type : int

\OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE

$provider : ILockingProvider
Tags
throws
LockedException
since
9.0.0

        
On this page

Search results