PHP Class Spork\Factory

Mostrar archivo Open project: kriswallsmith/spork

Public Methods

Method Description
createBatchJob ( ProcessManager $manager, null $data = null, Spork\Batch\Strategy\StrategyInterface $strategy = null ) : Spork\Batch\BatchJob Creates a new batch job instance.
createFork ( integer $pid, SharedMemory $shm, boolean $debug = false ) : Fork Creates a new fork instance.
createSharedMemory ( integer $pid = null, integer $signal = null ) : SharedMemory Creates a new shared memory instance.

Method Details

createBatchJob() public method

Creates a new batch job instance.
public createBatchJob ( ProcessManager $manager, null $data = null, Spork\Batch\Strategy\StrategyInterface $strategy = null ) : Spork\Batch\BatchJob
$manager ProcessManager The process manager
$data null Data for the batch job
$strategy Spork\Batch\Strategy\StrategyInterface The strategy
return Spork\Batch\BatchJob A new batch job instance

createFork() public method

Creates a new fork instance.
public createFork ( integer $pid, SharedMemory $shm, boolean $debug = false ) : Fork
$pid integer Process id
$shm SharedMemory Shared memory
$debug boolean Debug mode
return Fork A new fork instance

createSharedMemory() public method

Creates a new shared memory instance.
public createSharedMemory ( integer $pid = null, integer $signal = null ) : SharedMemory
$pid integer The child process id or null if this is the child
$signal integer The signal to send after writing to shared memory
return SharedMemory A new shared memory instance