diff options
author | Julius Härtl <jus@bitgrid.net> | 2022-04-06 17:47:45 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2022-04-07 11:52:16 +0200 |
commit | 9b408d556d32ea81883e1f6a61a821e1959025e6 (patch) | |
tree | a1229f2fccf12dc50e30ce7a39d15352a6f1434e /lib/public/Files | |
parent | 40f1ad60c245bfe35998b718aab2fe0f726f3798 (diff) | |
download | nextcloud-server-9b408d556d32ea81883e1f6a61a821e1959025e6.tar.gz nextcloud-server-9b408d556d32ea81883e1f6a61a821e1959025e6.zip |
Adapt LockScope to LockContext rename
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/public/Files')
-rw-r--r-- | lib/public/Files/Lock/ILockManager.php | 4 | ||||
-rw-r--r-- | lib/public/Files/Lock/ILockProvider.php | 4 | ||||
-rw-r--r-- | lib/public/Files/Lock/LockContext.php (renamed from lib/public/Files/Lock/LockScope.php) | 5 |
3 files changed, 7 insertions, 6 deletions
diff --git a/lib/public/Files/Lock/ILockManager.php b/lib/public/Files/Lock/ILockManager.php index bd6d7db69d6..cad66380e93 100644 --- a/lib/public/Files/Lock/ILockManager.php +++ b/lib/public/Files/Lock/ILockManager.php @@ -59,11 +59,11 @@ interface ILockManager extends ILockProvider { * * @since 24.0.0 */ - public function runInScope(LockScope $lock, callable $callback): void; + public function runInScope(LockContext $lock, callable $callback): void; /** * @throws NoLockProviderException if there is no lock provider available * @since 24.0.0 */ - public function getLockInScope(): ?LockScope; + public function getLockInScope(): ?LockContext; } diff --git a/lib/public/Files/Lock/ILockProvider.php b/lib/public/Files/Lock/ILockProvider.php index 5df28aaef44..50326c427e4 100644 --- a/lib/public/Files/Lock/ILockProvider.php +++ b/lib/public/Files/Lock/ILockProvider.php @@ -47,12 +47,12 @@ interface ILockProvider { * @throws NoLockProviderException * @since 24.0.0 */ - public function lock(LockScope $lockInfo): ILock; + public function lock(LockContext $lockInfo): ILock; /** * @throws PreConditionNotMetException * @throws NoLockProviderException * @since 24.0.0 */ - public function unlock(LockScope $lockInfo): void; + public function unlock(LockContext $lockInfo): void; } diff --git a/lib/public/Files/Lock/LockScope.php b/lib/public/Files/Lock/LockContext.php index 4d68f4c68c7..1466cb41ae1 100644 --- a/lib/public/Files/Lock/LockScope.php +++ b/lib/public/Files/Lock/LockContext.php @@ -29,13 +29,14 @@ namespace OCP\Files\Lock; use OCP\Files\Node; /** - * Structure to identify a specific lock scope + * Structure to identify a specific lock context to request or + * describe a lock with the affected node and ownership information * * This is used to match a lock/unlock request or file operation to existing locks * * @since 24.0.0 */ -final class LockScope { +final class LockContext { private Node $node; private int $type; private string $owner; |