[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/includes/filebackend/lockmanager/ -> RedisLockManager.php (summary)

Version of LockManager based on using redis servers. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

File Size: 272 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

RedisLockManager:: (7 methods):
  __construct()
  getLocksOnServer()
  freeLocksOnServer()
  releaseAllLocks()
  isServerUp()
  recordKeyForPath()
  __destruct()


Class: RedisLockManager  - X-Ref

Manage locks using redis servers.

Version of LockManager based on using redis 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 redis.
A majority of peers must agree for a lock to be acquired.

This class requires Redis 2.6 as it makes use Lua scripts for fast atomic operations.

__construct( array $config )   X-Ref
Construct a new instance from configuration.

param: array $config Parameters include:

getLocksOnServer( $lockSrv, array $pathsByType )   X-Ref
No description

freeLocksOnServer( $lockSrv, array $pathsByType )   X-Ref
No description

releaseAllLocks()   X-Ref
No description

isServerUp( $lockSrv )   X-Ref
No description

recordKeyForPath( $path, $type )   X-Ref

param: string $path
param: string $type One of (EX,SH)
return: string

__destruct()   X-Ref
Make sure remaining locks get cleared for sanity




Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1