[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

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

Simple version of LockManager based on using FS lock files. 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: 248 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

FSLockManager:: (9 methods):
  __construct()
  doLock()
  doUnlock()
  doSingleLock()
  doSingleUnlock()
  closeLockHandles()
  pruneKeyLockFiles()
  getLockPath()
  __destruct()


Class: FSLockManager  - X-Ref

Simple version of LockManager based on using FS lock files.
All locks are non-blocking, which avoids deadlocks.

This should work fine for small sites running off one server.
Do not use this with 'lockDirectory' set to an NFS mount unless the
NFS client is at least version 2.6.12. Otherwise, the BSD flock()
locks will be ignored; see http://nfs.sourceforge.net/#section_d.

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

param: array $config Includes:

doLock( array $paths, $type )   X-Ref

param: array $paths
param: int $type
return: Status

doUnlock( array $paths, $type )   X-Ref

param: array $paths
param: int $type
return: Status

doSingleLock( $path, $type )   X-Ref
Lock a single resource key

param: string $path
param: int $type
return: Status

doSingleUnlock( $path, $type )   X-Ref
Unlock a single resource key

param: string $path
param: int $type
return: Status

closeLockHandles( $path, array $handlesToClose )   X-Ref

param: string $path
param: array $handlesToClose
return: Status

pruneKeyLockFiles( $path )   X-Ref

param: string $path
return: Status

getLockPath( $path )   X-Ref
Get the path to the lock file for a key

param: string $path
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