PHP Class PHPDaemon\Thread\IPC

Inheritance: extends Generic
Datei anzeigen Open project: kakserpom/phpdaemon Class Usage Examples

Public Properties

Property Type Description
$IPCManager
$fileWatcher PHPDaemon\FS\FileWatcher File watcher
$instancesCount array Instances count
$loop PHPDaemon\Core\EventLoop Event base
$reload boolean If true, we do not register signals automatically at start
$update boolean Update?

Protected Properties

Property Type Description
$breakMainLoop boolean Break main loop?
$delayedSigReg boolean If true, we do not register signals automatically at start
$reloadReady boolean Reload ready?

Public Methods

Method Description
log ( string $message ) : void Log something
shutdown ( $hard = false ) : boolean | null Shutdown thread
sighup ( ) : void Handler of the SIGHUP (reload config) signal in worker process.
sigquit ( ) : void Handler of the SIGQUIT (graceful shutdown) signal in worker process.
sigttin ( ) : void Handler of the SIGTTIN signal in worker process.
sigunknown ( $signo ) : void Handler of non-known signals.
sigusr1 ( ) : void Handler of the SIGUSR1 (re-open log-file) signal in worker process.
sigusr2 ( ) : void Handler of the SIGUSR2 (graceful shutdown for update) signal in worker process.
sigxfsz ( ) : void Handler of the SIGXSFZ signal in worker process.

Protected Methods

Method Description
prepareSystemEnv ( ) : void Setup settings on start.
run ( ) : void Runtime of Worker process.
sigint ( ) : void Handler of the SIGINT (hard shutdown) signal in worker process.
sigterm ( ) : void Handler of the SIGTERM (graceful shutdown) signal in worker process.
sigtstp ( ) : void Handler of the SIGTSTP (graceful stop) signal in worker process.
update ( ) : void Reloads additional config-files on-the-fly.

Method Details

log() public method

Log something
public log ( string $message ) : void
$message string
return void

prepareSystemEnv() protected method

Setup settings on start.
protected prepareSystemEnv ( ) : void
return void

run() protected method

Runtime of Worker process.
protected run ( ) : void
return void

shutdown() public method

Shutdown thread
public shutdown ( $hard = false ) : boolean | null
return boolean | null - Ready?

sighup() public method

Handler of the SIGHUP (reload config) signal in worker process.
public sighup ( ) : void
return void

sigint() protected method

Handler of the SIGINT (hard shutdown) signal in worker process.
protected sigint ( ) : void
return void

sigquit() public method

Handler of the SIGQUIT (graceful shutdown) signal in worker process.
public sigquit ( ) : void
return void

sigterm() protected method

Handler of the SIGTERM (graceful shutdown) signal in worker process.
protected sigterm ( ) : void
return void

sigtstp() protected method

Handler of the SIGTSTP (graceful stop) signal in worker process.
protected sigtstp ( ) : void
return void

sigttin() public method

Handler of the SIGTTIN signal in worker process.
public sigttin ( ) : void
return void

sigunknown() public method

Handler of non-known signals.
public sigunknown ( $signo ) : void
return void

sigusr1() public method

Handler of the SIGUSR1 (re-open log-file) signal in worker process.
public sigusr1 ( ) : void
return void

sigusr2() public method

Handler of the SIGUSR2 (graceful shutdown for update) signal in worker process.
public sigusr2 ( ) : void
return void

sigxfsz() public method

Handler of the SIGXSFZ signal in worker process.
public sigxfsz ( ) : void
return void

update() protected method

Reloads additional config-files on-the-fly.
protected update ( ) : void
return void

Property Details

$IPCManager public_oe property

public $IPCManager

$breakMainLoop protected_oe property

Break main loop?
protected bool $breakMainLoop
return boolean

$delayedSigReg protected_oe property

If true, we do not register signals automatically at start
protected bool $delayedSigReg
return boolean

$fileWatcher public_oe property

File watcher
public FileWatcher,PHPDaemon\FS $fileWatcher
return PHPDaemon\FS\FileWatcher

$instancesCount public_oe property

Instances count
public array $instancesCount
return array

$loop public_oe property

Event base
public EventLoop,PHPDaemon\Core $loop
return PHPDaemon\Core\EventLoop

$reload public_oe property

If true, we do not register signals automatically at start
public bool $reload
return boolean

$reloadReady protected_oe property

Reload ready?
protected bool $reloadReady
return boolean

$update public_oe property

Update?
public bool $update
return boolean