| 1 | <?php |
||
| 14 | class Pipeline |
||
| 15 | { |
||
| 16 | /** @var EventDispatcherInterface */ |
||
| 17 | private $dispatcher; |
||
| 18 | |||
| 19 | /** @var AbstractParaunitProcess */ |
||
| 20 | private $process; |
||
| 21 | |||
| 22 | /** @var int */ |
||
| 23 | private $number; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Pipeline constructor. |
||
| 27 | * @param EventDispatcherInterface $dispatcher |
||
| 28 | * @param int $number |
||
| 29 | */ |
||
| 30 | 37 | public function __construct(EventDispatcherInterface $dispatcher, int $number) |
|
| 35 | |||
| 36 | 20 | public function execute(AbstractParaunitProcess $process) |
|
| 47 | |||
| 48 | 21 | public function isFree(): bool |
|
| 52 | |||
| 53 | 3 | public function isTerminated(): bool |
|
| 61 | |||
| 62 | 16 | public function triggerTermination(): bool |
|
| 76 | |||
| 77 | 2 | public function getNumber(): int |
|
| 81 | |||
| 82 | 16 | private function handleProcessTermination() |
|
| 87 | } |
||
| 88 |