MediaWiki
REL1_19
|
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 | |
$deadSessions = array() | |
$lockHolder | |
$lockTimeout | |
$maxBacklog | |
$maxClients | |
$port | |
$sessions = array() | |
$sock | |
$startTime | |
$ticks = 0 | |
Static Protected Attributes | |
static | $instance = null |
Simple lock server daemon that accepts lock/unlock requests.
Definition at line 27 of file LockServerDaemon.php.
LockServerDaemon::__construct | ( | array $ | config | ) | [protected] |
$config Array
Definition at line 75 of file LockServerDaemon.php.
LockServerDaemon::doCommand | ( | $ | data, |
$ | sourceSock | ||
) | [protected] |
$data | string |
$sourceSock | resource |
Definition at line 193 of file LockServerDaemon.php.
References getCommand(), and stat().
Referenced by main().
LockServerDaemon::getCommand | ( | $ | data | ) | [protected] |
$data | string |
Definition at line 220 of file LockServerDaemon.php.
References $command.
Referenced by doCommand().
static LockServerDaemon::init | ( | array $ | config | ) | [static] |
$config Array
Definition at line 55 of file LockServerDaemon.php.
References $instance.
Entry-point function that listens to the server socket, accepts new clients, and recieves/responds to requests to lock resources.
Definition at line 125 of file LockServerDaemon.php.
References doCommand(), purgeExpiredLocks(), recordDeadSocket(), and setupServerSocket().
LockServerDaemon::purgeExpiredLocks | ( | ) | [protected] |
Clear locks for sessions that have been dead for a while.
Definition at line 281 of file LockServerDaemon.php.
References $count.
Referenced by main().
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 263 of file LockServerDaemon.php.
Referenced by main().
LockServerDaemon::setupServerSocket | ( | ) | [protected] |
Definition at line 100 of file LockServerDaemon.php.
References $sock.
Referenced by main().
LockServerDaemon::stat | ( | ) | [protected] |
Get the current timestamp and memory usage.
Definition at line 299 of file LockServerDaemon.php.
Referenced by doCommand().
LockServerDaemon::$address [protected] |
Definition at line 38 of file LockServerDaemon.php.
LockServerDaemon::$authKey [protected] |
Definition at line 40 of file LockServerDaemon.php.
LockServerDaemon::$deadSessions = array() [protected] |
Definition at line 33 of file LockServerDaemon.php.
LockServerDaemon::$instance = null [static, protected] |
Definition at line 49 of file LockServerDaemon.php.
Referenced by init().
LockServerDaemon::$lockHolder [protected] |
Definition at line 36 of file LockServerDaemon.php.
LockServerDaemon::$lockTimeout [protected] |
Definition at line 41 of file LockServerDaemon.php.
LockServerDaemon::$maxBacklog [protected] |
Definition at line 42 of file LockServerDaemon.php.
LockServerDaemon::$maxClients [protected] |
Definition at line 43 of file LockServerDaemon.php.
LockServerDaemon::$port [protected] |
Definition at line 39 of file LockServerDaemon.php.
LockServerDaemon::$sessions = array() [protected] |
Definition at line 31 of file LockServerDaemon.php.
LockServerDaemon::$sock [protected] |
Definition at line 29 of file LockServerDaemon.php.
Referenced by setupServerSocket().
LockServerDaemon::$startTime [protected] |
Definition at line 45 of file LockServerDaemon.php.
LockServerDaemon::$ticks = 0 [protected] |
Definition at line 46 of file LockServerDaemon.php.