MediaWiki
REL1_24
|
Version of LockManager that uses a quorum from peer servers for locks. More...
Protected Member Functions | |
doLock (array $paths, $type) | |
Lock resources with the given keys and lock type. | |
doLockByType (array $pathsByType) | |
doLockingRequestBucket ($bucket, array $pathsByType) | |
Attempt to acquire locks with the peers for a bucket. | |
doUnlock (array $paths, $type) | |
Unlock resources with the given keys and lock type. | |
doUnlockByType (array $pathsByType) | |
doUnlockingRequestBucket ($bucket, array $pathsByType) | |
Attempt to release locks with the peers for a bucket. | |
freeLocksOnServer ($lockSrv, array $pathsByType) | |
Get a connection to a lock server and release locks on $paths. | |
getBucketFromPath ($path) | |
Get the bucket for resource path. | |
getLocksOnServer ($lockSrv, array $pathsByType) | |
Get a connection to a lock server and acquire locks. | |
isServerUp ($lockSrv) | |
Check if a lock server is up. | |
releaseAllLocks () | |
Release all locks that this session is holding. | |
Protected Attributes | |
array | $degradedBuckets = array() |
Map of degraded buckets *. | |
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 31 of file QuorumLockManager.php.
QuorumLockManager::doLock | ( | array $ | paths, |
$ | type | ||
) | [final, protected] |
Lock resources with the given keys and lock type.
array | $paths | List of paths |
int | $type | LockManager::LOCK_* constant |
Reimplemented from LockManager.
Definition at line 36 of file QuorumLockManager.php.
QuorumLockManager::doLockByType | ( | array $ | pathsByType | ) | [protected] |
array | $pathsByType | Map of LockManager::LOCK_* constants to lists of paths |
Reimplemented from LockManager.
Definition at line 44 of file QuorumLockManager.php.
QuorumLockManager::doLockingRequestBucket | ( | $ | bucket, |
array $ | pathsByType | ||
) | [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.
int | $bucket | |
array | $pathsByType | Map of LockManager::LOCK_* constants to lists of paths |
Definition at line 127 of file QuorumLockManager.php.
QuorumLockManager::doUnlock | ( | array $ | paths, |
$ | type | ||
) | [final, protected] |
Unlock resources with the given keys and lock type.
array | $paths | List of paths |
int | $type | LockManager::LOCK_* constant |
Reimplemented from LockManager.
Definition at line 40 of file QuorumLockManager.php.
Referenced by MemcLockManager\__destruct().
QuorumLockManager::doUnlockByType | ( | array $ | pathsByType | ) | [protected] |
array | $pathsByType | Map of LockManager::LOCK_* constants to lists of paths |
Reimplemented from LockManager.
Definition at line 83 of file QuorumLockManager.php.
QuorumLockManager::doUnlockingRequestBucket | ( | $ | bucket, |
array $ | pathsByType | ||
) | [final, protected] |
Attempt to release locks with the peers for a bucket.
int | $bucket | |
array | $pathsByType | Map of LockManager::LOCK_* constants to lists of paths |
Definition at line 169 of file QuorumLockManager.php.
QuorumLockManager::freeLocksOnServer | ( | $ | lockSrv, |
array $ | pathsByType | ||
) | [abstract, protected] |
Get a connection to a lock server and release locks on $paths.
Subclasses must effectively implement this or releaseAllLocks().
string | $lockSrv | |
array | $pathsByType | Map of LockManager::LOCK_* constants to lists of paths |
Reimplemented in RedisLockManager, DBLockManager, and MemcLockManager.
QuorumLockManager::getBucketFromPath | ( | $ | path | ) | [protected] |
Get the bucket for resource path.
This should avoid throwing any exceptions.
string | $path |
Definition at line 204 of file QuorumLockManager.php.
QuorumLockManager::getLocksOnServer | ( | $ | lockSrv, |
array $ | pathsByType | ||
) | [abstract, protected] |
Get a connection to a lock server and acquire locks.
string | $lockSrv | |
array | $pathsByType | Map of LockManager::LOCK_* constants to lists of paths |
Reimplemented in DBLockManager, MemcLockManager, and RedisLockManager.
QuorumLockManager::isServerUp | ( | $ | lockSrv | ) | [abstract, protected] |
Check if a lock server is up.
This should process cache results to reduce RTT.
string | $lockSrv |
Reimplemented in MemcLockManager, RedisLockManager, and DBLockManager.
QuorumLockManager::releaseAllLocks | ( | ) | [abstract, protected] |
Release all locks that this session is holding.
Subclasses must effectively implement this or freeLocksOnServer().
Reimplemented in PostgreSqlLockManager, MySqlLockManager, MemcLockManager, and RedisLockManager.
Map of degraded buckets *.
Definition at line 34 of file QuorumLockManager.php.
Map of bucket indexes to peer server lists *.
Definition at line 32 of file QuorumLockManager.php.