2015-05-21 14:11:10 +00:00
|
|
|
<?php
|
2019-12-03 18:57:53 +00:00
|
|
|
|
2018-01-16 18:34:43 +00:00
|
|
|
declare(strict_types=1);
|
2015-05-21 14:11:10 +00:00
|
|
|
/**
|
2024-05-23 07:26:56 +00: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 14:11:10 +00: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 18:34:43 +00:00
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
*/
|
|
|
|
public function isLocked(string $path, int $type): bool {
|
2015-05-21 14:11:10 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2018-01-16 18:34:43 +00:00
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
*/
|
2022-04-22 13:00:20 +00:00
|
|
|
public function acquireLock(string $path, int $type, ?string $readablePath = null): void {
|
2015-05-21 14:11:10 +00:00
|
|
|
// do nothing
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2018-01-16 18:34:43 +00:00
|
|
|
* {@inheritdoc}
|
2015-05-21 14:11:10 +00:00
|
|
|
*/
|
2022-04-22 13:00:20 +00:00
|
|
|
public function releaseLock(string $path, int $type): void {
|
2015-05-21 14:11:10 +00:00
|
|
|
// do nothing
|
|
|
|
}
|
|
|
|
|
2015-06-01 11:25:27 +00:00
|
|
|
/**1
|
|
|
|
* {@inheritdoc}
|
2015-05-21 14:11:10 +00:00
|
|
|
*/
|
2022-04-22 13:00:20 +00:00
|
|
|
public function releaseAll(): void {
|
2015-05-21 14:11:10 +00:00
|
|
|
// do nothing
|
|
|
|
}
|
2015-06-01 11:25:27 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
*/
|
2022-04-22 13:00:20 +00:00
|
|
|
public function changeLock(string $path, int $targetType): void {
|
2015-06-01 11:25:27 +00:00
|
|
|
// do nothing
|
|
|
|
}
|
2015-05-21 14:11:10 +00:00
|
|
|
}
|