MediaWiki master
NullLockManager Class Reference

Simple lock management based on in-process reference counting. More...

Inherits LockManager.

Collaboration diagram for NullLockManager:

Protected Member Functions

 doLock (array $paths, $type)
 Lock resources with the given keys and lock type.
 
 doUnlock (array $paths, $type)
 Unlock resources with the given keys and lock type.
 
- Protected Member Functions inherited from LockManager
 doLockByType (array $pathsByType)
 
 doUnlockByType (array $pathsByType)
 
 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 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.
 
 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.
 
- Public Attributes inherited from LockManager
const LOCK_EX = 3
 
const LOCK_SH = 1
 Lock types; stronger locks have higher values.
 
const LOCK_UW = 2
 
- Protected Attributes inherited from 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 CLI_LOCK_TTL = 3600
 Default lock TTL in CLI mode.
 
const MAX_LOCK_TTL = 2 * 3600
 Max expected lock expiry in any context.
 
const MIN_GUESSED_LOCK_TTL = 5 * 60
 The minimum lock TTL if it is guessed from max_execution_time rather than configured.
 
const MIN_LOCK_TTL = 5
 Minimum lock TTL.
 

Detailed Description

Simple lock management based on in-process reference counting.

Since
1.19

Definition at line 27 of file NullLockManager.php.

Member Function Documentation

◆ doLock()

NullLockManager::doLock ( array $paths,
$type )
protected

Lock resources with the given keys and lock type.

Parameters
array$pathsList of paths
int$typeLockManager::LOCK_* constant
Returns
StatusValue

Reimplemented from LockManager.

Definition at line 28 of file NullLockManager.php.

References $path.

◆ doUnlock()

NullLockManager::doUnlock ( array $paths,
$type )
protected

Unlock resources with the given keys and lock type.

Parameters
array$pathsList of paths
int$typeLockManager::LOCK_* constant
Returns
StatusValue

Reimplemented from LockManager.

Definition at line 40 of file NullLockManager.php.

References $path.


The documentation for this class was generated from the following file: