|
MediaWiki master
|
Simple lock management based on in-process reference counting. More...
Inherits Wikimedia\LockManager\LockManager.

Protected Member Functions | ||||
| doLockByType (array $pathsByType) | ||||
Acquire a set of locks without blocking.If some locks could not be acquired, then the other locks should be released. This must set the "lockmanager-fail-conflict" error if there are any lock conflicts.
| ||||
| doUnlockByType (array $pathsByType) | ||||
Release a set of locks.
| ||||
| Protected Member Functions inherited from Wikimedia\LockManager\LockManager | ||||
| normalizePathsByType (array $pathsByType) | ||||
| Normalize the $paths array by converting LOCK_UW locks into the appropriate type and removing any duplicated paths for each lock type. | ||||
| sha1Base36Absolute ( $path) | ||||
| Get the base 36 SHA-1 of a string, padded to 31 digits. | ||||
Additional Inherited Members | |||||||
| Public Member Functions inherited from Wikimedia\LockManager\LockManager | |||||||
| __construct (array $config) | |||||||
| Construct a new instance from configuration. | |||||||
| lock (array $paths, $type=self::LOCK_EX, $timeout=0) | |||||||
| Lock the resources at the given abstract paths. | |||||||
| lockByType (array $pathsByType, $timeout=0) | |||||||
| Lock the resources at the given abstract paths. | |||||||
| 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.
| |||||||
| unlock (array $paths, $type=self::LOCK_EX) | |||||||
| Unlock the resources at the given abstract paths. | |||||||
| unlockByType (array $pathsByType) | |||||||
| Unlock the resources at the given abstract paths. | |||||||
| unlockKey (string $key) | |||||||
| |||||||
| Public Attributes inherited from Wikimedia\LockManager\LockManager | |||||||
| const | LOCK_EX = 3 | ||||||
| const | LOCK_SH = 1 | ||||||
| Lock types; stronger locks have higher values. | |||||||
| const | LOCK_UW = 2 | ||||||
| Protected Attributes inherited from Wikimedia\LockManager\LockManager | |||||||
| string | $domain | ||||||
| domain (usually wiki ID) | |||||||
| array | $locksHeld = [] | ||||||
| Map of (resource path => lock type => count). | |||||||
| int | $lockTTL | ||||||
| maximum time locks can be held | |||||||
| array | $lockTypeMap | ||||||
| Mapping of lock types to the type actually used. | |||||||
| LoggerInterface | $logger | ||||||
| string | $session | ||||||
| Random 32-char hex number. | |||||||
| const | MAX_LOCK_TTL = 2 * 3600 | ||||||
| Max expected lock expiry in any context. | |||||||
| const | MIN_LOCK_TTL = 5 | ||||||
| Minimum lock TTL. | |||||||
Simple lock management based on in-process reference counting.
Definition at line 16 of file NullLockManager.php.
|
protected |
Acquire a set of locks without blocking.If some locks could not be acquired, then the other locks should be released. This must set the "lockmanager-fail-conflict" error if there are any lock conflicts.
| array | $pathsByType | Map of LockManager::LOCK_* constants to lists of paths |
Reimplemented from Wikimedia\LockManager\LockManager.
Definition at line 18 of file NullLockManager.php.
References $path.
|
protected |
Release a set of locks.
| array | $pathsByType | Map of LockManager::LOCK_* constants to lists of paths |
Reimplemented from Wikimedia\LockManager\LockManager.
Definition at line 33 of file NullLockManager.php.
References $path.