2015-05-21 10:11:10 -04:00
|
|
|
<?php
|
2019-12-03 13:57:53 -05:00
|
|
|
|
2018-01-16 13:34:43 -05:00
|
|
|
declare(strict_types=1);
|
2015-05-21 10:11:10 -04:00
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
2015-05-21 10:11:10 -04:00
|
|
|
*/
|
|
|
|
|
namespace OC\Lock;
|
|
|
|
|
|
|
|
|
|
use OCP\Lock\ILockingProvider;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Locking provider that does nothing.
|
|
|
|
|
*
|
|
|
|
|
* To be used when locking is disabled.
|
|
|
|
|
*/
|
|
|
|
|
class NoopLockingProvider implements ILockingProvider {
|
2018-01-16 13:34:43 -05:00
|
|
|
/**
|
|
|
|
|
* {@inheritdoc}
|
|
|
|
|
*/
|
|
|
|
|
public function isLocked(string $path, int $type): bool {
|
2015-05-21 10:11:10 -04:00
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2018-01-16 13:34:43 -05:00
|
|
|
/**
|
|
|
|
|
* {@inheritdoc}
|
|
|
|
|
*/
|
2022-04-22 09:00:20 -04:00
|
|
|
public function acquireLock(string $path, int $type, ?string $readablePath = null): void {
|
2015-05-21 10:11:10 -04:00
|
|
|
// do nothing
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2018-01-16 13:34:43 -05:00
|
|
|
* {@inheritdoc}
|
2015-05-21 10:11:10 -04:00
|
|
|
*/
|
2022-04-22 09:00:20 -04:00
|
|
|
public function releaseLock(string $path, int $type): void {
|
2015-05-21 10:11:10 -04:00
|
|
|
// do nothing
|
|
|
|
|
}
|
|
|
|
|
|
2015-06-01 07:25:27 -04:00
|
|
|
/**1
|
|
|
|
|
* {@inheritdoc}
|
2015-05-21 10:11:10 -04:00
|
|
|
*/
|
2022-04-22 09:00:20 -04:00
|
|
|
public function releaseAll(): void {
|
2015-05-21 10:11:10 -04:00
|
|
|
// do nothing
|
|
|
|
|
}
|
2015-06-01 07:25:27 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* {@inheritdoc}
|
|
|
|
|
*/
|
2022-04-22 09:00:20 -04:00
|
|
|
public function changeLock(string $path, int $targetType): void {
|
2015-06-01 07:25:27 -04:00
|
|
|
// do nothing
|
|
|
|
|
}
|
2015-05-21 10:11:10 -04:00
|
|
|
}
|