|
MediaWiki
REL1_20
|
Version of LockManager that uses a quorum from peer servers for locks. More...


Protected Member Functions | |
| doLock (array $paths, $type) | |
| doLockingRequestBucket ($bucket, array $paths, $type) | |
| Attempt to acquire locks with the peers for a bucket. | |
| doUnlock (array $paths, $type) | |
| doUnlockingRequestBucket ($bucket, array $paths, $type) | |
| Attempt to release locks with the peers for a bucket. | |
| freeLocksOnServer ($lockSrv, array $paths, $type) | |
| Get a connection to a lock server and release locks on $paths. | |
| getBucketFromKey ($path) | |
| Get the bucket for resource path. | |
| getLocksOnServer ($lockSrv, array $paths, $type) | |
| Get a connection to a lock server and acquire locks on $paths. | |
| isServerUp ($lockSrv) | |
| Check if a lock server is up. | |
| releaseAllLocks () | |
| Release all locks that this session is holding. | |
Protected Attributes | |
| Array | $srvsByBucket = array() |
| Map of bucket indexes to peer server lists *. | |
Version of LockManager that uses a quorum from peer servers for locks.
The resource space can also be sharded into separate peer groups.
Definition at line 193 of file LockManager.php.
| QuorumLockManager::doLock | ( | array $ | paths, |
| $ | type | ||
| ) | [final, protected] |
| $paths | array |
| $type | int |
Reimplemented from LockManager.
Definition at line 202 of file LockManager.php.
| QuorumLockManager::doLockingRequestBucket | ( | $ | bucket, |
| array $ | paths, | ||
| $ | type | ||
| ) | [final, protected] |
Attempt to acquire locks with the peers for a bucket.
This is all or nothing; if any key is locked then this totally fails.
| $bucket | integer |
| $paths | Array List of resource keys to lock |
| $type | integer LockManager::LOCK_EX or LockManager::LOCK_SH |
Definition at line 286 of file LockManager.php.
| QuorumLockManager::doUnlock | ( | array $ | paths, |
| $ | type | ||
| ) | [final, protected] |
| $paths | array |
| $type | int |
Reimplemented from LockManager.
Definition at line 244 of file LockManager.php.
| QuorumLockManager::doUnlockingRequestBucket | ( | $ | bucket, |
| array $ | paths, | ||
| $ | type | ||
| ) | [final, protected] |
Attempt to release locks with the peers for a bucket.
| $bucket | integer |
| $paths | Array List of resource keys to lock |
| $type | integer LockManager::LOCK_EX or LockManager::LOCK_SH |
Definition at line 328 of file LockManager.php.
| QuorumLockManager::freeLocksOnServer | ( | $ | lockSrv, |
| array $ | paths, | ||
| $ | type | ||
| ) | [abstract, protected] |
Get a connection to a lock server and release locks on $paths.
Subclasses must effectively implement this or releaseAllLocks().
| $lockSrv | string |
| $paths | array |
| $type | integer |
Reimplemented in MemcLockManager, DBLockManager, and LSLockManager.
| QuorumLockManager::getBucketFromKey | ( | $ | path | ) | [protected] |
Get the bucket for resource path.
This should avoid throwing any exceptions.
| $path | string |
Definition at line 350 of file LockManager.php.
| QuorumLockManager::getLocksOnServer | ( | $ | lockSrv, |
| array $ | paths, | ||
| $ | type | ||
| ) | [abstract, protected] |
Get a connection to a lock server and acquire locks on $paths.
| $lockSrv | string |
| $paths | array |
| $type | integer |
Reimplemented in MySqlLockManager, DBLockManager, MemcLockManager, and LSLockManager.
| QuorumLockManager::isServerUp | ( | $ | lockSrv | ) | [abstract, protected] |
Check if a lock server is up.
| $lockSrv | string |
Reimplemented in MemcLockManager, DBLockManager, and LSLockManager.
| QuorumLockManager::releaseAllLocks | ( | ) | [abstract, protected] |
Release all locks that this session is holding.
Subclasses must effectively implement this or freeLocksOnServer().
Reimplemented in MemcLockManager, DBLockManager, and LSLockManager.
Array QuorumLockManager::$srvsByBucket = array() [protected] |
Map of bucket indexes to peer server lists *.
Definition at line 194 of file LockManager.php.