Documentation

ProcessDetailsCollection
in package
implements IteratorAggregate

The Process Details Collection Class

Table of Contents

Interfaces

IteratorAggregate

Properties

$processDetails  : array<string|int, ProcessDetails>
$freeProcessIds  : array<string|int, mixed>
$sockets  : array<string|int, SimpleSocket>

Methods

addFree()  : ProcessDetailsCollection
Adds the ProcessDetails to the list and registers it as a free one.
getAllProcesssDetails()  : array<string|int, ProcessDetails>
Get all ProcessDetails by reference
getFreeProcessesCount()  : int
Get the count of free processes
getIterator()  : ArrayIterator
getProcessDetails()  : ProcessDetails
Get a ProcessDetails of the given PID
getProcessesCount()  : int
Get the count of processes
getSockets()  : array<string|int, SimpleSocket>
Returns the associated sockets of all processes in the list.
hasProcess()  : bool
Checks if the ProcessDetails with given PID is in the list.
killAllProcesses()  : void
Sends the kill signal to all processes and removes them from the list.
registerFreeProcess()  : ProcessDetailsCollection
Register a ProcessDetails as free
registerFreeProcessId()  : ProcessDetailsCollection
Register the ProcessDetails with the given PID as free.
remove()  : ProcessDetailsCollection
Removes the ProcessDetails from the list.
takeFreeProcess()  : ProcessDetails
Takes one ProcessDetails from the list of free ProcessDetails. Returns NULL if no free process is available.

Properties

Methods

getFreeProcessesCount()

Get the count of free processes

public getFreeProcessesCount() : int
Return values
int

hasProcess()

Checks if the ProcessDetails with given PID is in the list.

public hasProcess(int $pid) : bool
Parameters
$pid : int
Return values
bool

killAllProcesses()

Sends the kill signal to all processes and removes them from the list.

public killAllProcesses() : void

        
On this page

Search results