BlueSpice MediaWiki REL1_27
 All Classes Namespaces Files Functions Variables Groups Pages
QuorumLockManager Class Reference
Inheritance diagram for QuorumLockManager:
Collaboration diagram for QuorumLockManager:

Protected Member Functions

 doLock (array $paths, $type)
 
 doUnlock (array $paths, $type)
 
 doLockByType (array $pathsByType)
 
 doUnlockByType (array $pathsByType)
 
 doLockingRequestBucket ($bucket, array $pathsByType)
 
 doUnlockingRequestBucket ($bucket, array $pathsByType)
 
 getBucketFromPath ($path)
 
 isServerUp ($lockSrv)
 
 getLocksOnServer ($lockSrv, array $pathsByType)
 
 freeLocksOnServer ($lockSrv, array $pathsByType)
 
 releaseAllLocks ()
 
- Protected Member Functions inherited from LockManager
 sha1Base36Absolute ($path)
 
 sha1Base16Absolute ($path)
 
 normalizePathsByType (array $pathsByType)
 
 doLockByType (array $pathsByType)
 
 doLock (array $paths, $type)
 
 doUnlockByType (array $pathsByType)
 
 doUnlock (array $paths, $type)
 

Protected Attributes

 $srvsByBucket = []
 
 $degradedBuckets = []
 
- Protected Attributes inherited from LockManager
 $lockTypeMap
 
 $locksHeld = []
 
 $domain
 
 $lockTTL
 

Additional Inherited Members

- Public Member Functions inherited from LockManager
 __construct (array $config)
 
 lock (array $paths, $type=self::LOCK_EX, $timeout=0)
 
 lockByType (array $pathsByType, $timeout=0)
 
 unlock (array $paths, $type=self::LOCK_EX)
 
 unlockByType (array $pathsByType)
 
- Public Attributes inherited from LockManager
const LOCK_SH = 1
 
const LOCK_UW = 2
 
const LOCK_EX = 3
 

Detailed Description

Version of LockManager that uses a quorum from peer servers for locks. The resource space can also be sharded into separate peer groups.

Since
1.20

Member Function Documentation

QuorumLockManager::doLockingRequestBucket (   $bucket,
array  $pathsByType 
)
finalprotected

Attempt to acquire locks with the peers for a bucket. This is all or nothing; if any key is locked then this totally fails.

Parameters
int$bucket
array$pathsByTypeMap of LockManager::LOCK_* constants to lists of paths
Returns
Status
QuorumLockManager::doUnlockingRequestBucket (   $bucket,
array  $pathsByType 
)
finalprotected

Attempt to release locks with the peers for a bucket

Parameters
int$bucket
array$pathsByTypeMap of LockManager::LOCK_* constants to lists of paths
Returns
Status
QuorumLockManager::freeLocksOnServer (   $lockSrv,
array  $pathsByType 
)
abstractprotected

Get a connection to a lock server and release locks on $paths.

Subclasses must effectively implement this or releaseAllLocks().

Parameters
string$lockSrv
array$pathsByTypeMap of LockManager::LOCK_* constants to lists of paths
Returns
Status
QuorumLockManager::getBucketFromPath (   $path)
protected

Get the bucket for resource path. This should avoid throwing any exceptions.

Parameters
string$path
Returns
int
QuorumLockManager::getLocksOnServer (   $lockSrv,
array  $pathsByType 
)
abstractprotected

Get a connection to a lock server and acquire locks

Parameters
string$lockSrv
array$pathsByTypeMap of LockManager::LOCK_* constants to lists of paths
Returns
Status
QuorumLockManager::isServerUp (   $lockSrv)
abstractprotected

Check if a lock server is up. This should process cache results to reduce RTT.

Parameters
string$lockSrv
Returns
bool
QuorumLockManager::releaseAllLocks ( )
abstractprotected

Release all locks that this session is holding.

Subclasses must effectively implement this or freeLocksOnServer().

Returns
Status

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