MediaWiki master
ILockManager.php
Go to the documentation of this file.
1<?php
2
4
5use Wikimedia\ScopedCallback;
6
10interface ILockManager {
19 public function lockKey( string $key, int $timeout = 0 ): bool;
20
26 public function unlockKey( string $key ): bool;
27
35 public function scopedLock( string $key, int $timeout = 0 ): ?ScopedCallback;
36}
Interface representing MediaWiki's LockManager.
lockKey(string $key, int $timeout=0)
Provide a mutex of the key.
scopedLock(string $key, int $timeout=0)
Lock a key and unlock it automatically when the object is destructed.