MediaWiki
REL1_22
|
Manage locks using a lock daemon server. More...
Public Member Functions | |
__construct (array $config) | |
Construct a new instance from configuration. | |
__destruct () | |
Make sure remaining locks get cleared for sanity. | |
Protected Member Functions | |
freeLocksOnServer ($lockSrv, array $paths, $type) | |
getConnection ($lockSrv) | |
Get (or reuse) a connection to a lock server. | |
getLocksOnServer ($lockSrv, array $paths, $type) | |
isServerUp ($lockSrv) | |
releaseAllLocks () | |
sendCommand ($lockSrv, $action, $type, $values) | |
Send a command and get back the response. | |
Protected Attributes | |
Array | $conns = array() |
Map Server connections (server name => resource) *. | |
$connTimeout | |
Array | $lockServers |
Map of server names to server config *. | |
Array | $lockTypeMap |
Mapping of lock types to the type actually used *. | |
$session = '' |
Manage locks using a lock daemon server.
Version of LockManager based on using lock daemon servers. This is meant for multi-wiki systems that may share files. All locks are non-blocking, which avoids deadlocks.
All lock requests for a resource, identified by a hash string, will map to one bucket. Each bucket maps to one or several peer servers, each running LockServerDaemon.php, listening on a designated TCP port. A majority of peers must agree for a lock to be acquired.
Definition at line 39 of file LSLockManager.php.
LSLockManager::__construct | ( | array $ | config | ) |
Construct a new instance from configuration.
$config paramaters include:
array | $config |
Reimplemented from LockManager.
Definition at line 68 of file LSLockManager.php.
Make sure remaining locks get cleared for sanity.
Definition at line 209 of file LSLockManager.php.
LSLockManager::freeLocksOnServer | ( | $ | lockSrv, |
array $ | paths, | ||
$ | type | ||
) | [protected] |
Definition at line 110 of file LSLockManager.php.
LSLockManager::getConnection | ( | $ | lockSrv | ) | [protected] |
Get (or reuse) a connection to a lock server.
$lockSrv | string |
Definition at line 188 of file LSLockManager.php.
LSLockManager::getLocksOnServer | ( | $ | lockSrv, |
array $ | paths, | ||
$ | type | ||
) | [protected] |
Definition at line 89 of file LSLockManager.php.
LSLockManager::isServerUp | ( | $ | lockSrv | ) | [protected] |
Reimplemented from QuorumLockManager.
Definition at line 148 of file LSLockManager.php.
LSLockManager::releaseAllLocks | ( | ) | [protected] |
Reimplemented from QuorumLockManager.
Definition at line 131 of file LSLockManager.php.
LSLockManager::sendCommand | ( | $ | lockSrv, |
$ | action, | ||
$ | type, | ||
$ | values | ||
) | [protected] |
Send a command and get back the response.
$lockSrv | string |
$action | string |
$type | string |
$values | Array |
Definition at line 161 of file LSLockManager.php.
Array LSLockManager::$conns = array() [protected] |
Map Server connections (server name => resource) *.
Definition at line 48 of file LSLockManager.php.
LSLockManager::$connTimeout [protected] |
Definition at line 50 of file LSLockManager.php.
Array LSLockManager::$lockServers [protected] |
Map of server names to server config *.
Definition at line 46 of file LSLockManager.php.
Array LSLockManager::$lockTypeMap [protected] |
array( self::LOCK_SH => self::LOCK_SH, self::LOCK_UW => self::LOCK_SH, self::LOCK_EX => self::LOCK_EX )
Mapping of lock types to the type actually used *.
Reimplemented from LockManager.
Definition at line 40 of file LSLockManager.php.
LSLockManager::$session = '' [protected] |
Definition at line 51 of file LSLockManager.php.