MediaWiki
REL1_22
|
Simple lock server daemon that accepts lock/unlock requests. More...
Public Member Functions | |
main () | |
Entry-point function that listens to the server socket, accepts new clients, and recieves/responds to requests to lock resources. | |
Static Public Member Functions | |
static | init (array $config) |
$config Array | |
Protected Member Functions | |
__construct (array $config) | |
$config Array | |
doCommand ($data, $sourceSock) | |
getCommand ($data) | |
purgeExpiredLocks () | |
Clear locks for sessions that have been dead for a while. | |
recordDeadSocket ($socket) | |
Remove a socket's corresponding session from tracking and store it in the dead session tracking if it still has locks. | |
setupServerSocket () | |
stat () | |
Get the current timestamp and memory usage. | |
Protected Attributes | |
$address | |
$authKey | |
Array | $deadSessions = array() |
* | |
LockHolder | $lockHolder |
* | |
$lockTimeout | |
$maxBacklog | |
$maxClients | |
$port | |
Array | $sessions = array() |
* | |
resource | $sock |
* | |
$startTime | |
$ticks = 0 | |
Static Protected Attributes | |
static | $instance = null |
Simple lock server daemon that accepts lock/unlock requests.
Definition at line 45 of file LockServerDaemon.php.
LockServerDaemon::__construct | ( | array $ | config | ) | [protected] |
LockServerDaemon::doCommand | ( | $ | data, |
$ | sourceSock | ||
) | [protected] |
$data | string |
$sourceSock | resource |
Definition at line 210 of file LockServerDaemon.php.
LockServerDaemon::getCommand | ( | $ | data | ) | [protected] |
static LockServerDaemon::init | ( | array $ | config | ) | [static] |
$config Array
array | $config |
Exception |
Definition at line 71 of file LockServerDaemon.php.
Entry-point function that listens to the server socket, accepts new clients, and recieves/responds to requests to lock resources.
Definition at line 142 of file LockServerDaemon.php.
LockServerDaemon::purgeExpiredLocks | ( | ) | [protected] |
Clear locks for sessions that have been dead for a while.
Definition at line 300 of file LockServerDaemon.php.
LockServerDaemon::recordDeadSocket | ( | $ | socket | ) | [protected] |
Remove a socket's corresponding session from tracking and store it in the dead session tracking if it still has locks.
$socket | resource |
Definition at line 282 of file LockServerDaemon.php.
LockServerDaemon::setupServerSocket | ( | ) | [protected] |
LockServerDaemon::stat | ( | ) | [protected] |
Get the current timestamp and memory usage.
Definition at line 318 of file LockServerDaemon.php.
LockServerDaemon::$address [protected] |
Definition at line 52 of file LockServerDaemon.php.
LockServerDaemon::$authKey [protected] |
Definition at line 54 of file LockServerDaemon.php.
Array LockServerDaemon::$deadSessions = array() [protected] |
*
Definition at line 48 of file LockServerDaemon.php.
LockServerDaemon::$instance = null [static, protected] |
Definition at line 63 of file LockServerDaemon.php.
LockHolder LockServerDaemon::$lockHolder [protected] |
*
Definition at line 50 of file LockServerDaemon.php.
LockServerDaemon::$lockTimeout [protected] |
Definition at line 55 of file LockServerDaemon.php.
LockServerDaemon::$maxBacklog [protected] |
Definition at line 56 of file LockServerDaemon.php.
LockServerDaemon::$maxClients [protected] |
Definition at line 57 of file LockServerDaemon.php.
LockServerDaemon::$port [protected] |
Definition at line 53 of file LockServerDaemon.php.
Array LockServerDaemon::$sessions = array() [protected] |
*
Definition at line 47 of file LockServerDaemon.php.
resource LockServerDaemon::$sock [protected] |
*
Definition at line 46 of file LockServerDaemon.php.
LockServerDaemon::$startTime [protected] |
Definition at line 59 of file LockServerDaemon.php.
LockServerDaemon::$ticks = 0 [protected] |
Definition at line 60 of file LockServerDaemon.php.