1 | <?php |
||
22 | class Multiple extends AbstractQueue implements MultipleQueueInterface |
||
23 | { |
||
24 | /** |
||
25 | * @var QueueInterface[] |
||
26 | */ |
||
27 | public $queues = []; |
||
28 | |||
29 | /** |
||
30 | * @var StrategyInterface |
||
31 | */ |
||
32 | public $strategy = ['class' => Random::class]; |
||
33 | |||
34 | /** |
||
35 | * @inheritdoc |
||
36 | */ |
||
37 | public function init() |
||
51 | |||
52 | /** |
||
53 | * @inheritdoc |
||
54 | */ |
||
55 | public function getQueues() |
||
59 | |||
60 | /** |
||
61 | * @inheritdoc |
||
62 | */ |
||
63 | public function getQueue($index) |
||
70 | |||
71 | /** |
||
72 | * @inheritdoc |
||
73 | */ |
||
74 | protected function deleteJob(JobInterface $job): bool |
||
78 | |||
79 | /** |
||
80 | * @inheritdoc |
||
81 | */ |
||
82 | protected function fetchJob() |
||
86 | |||
87 | /** |
||
88 | * @inheritdoc |
||
89 | */ |
||
90 | protected function postJob(JobInterface $job, array $options = []): bool |
||
95 | |||
96 | /** |
||
97 | * Post new job to a specific queue. |
||
98 | * @param JobInterface $job |
||
99 | * @param integer $index |
||
100 | * @return bool |
||
101 | */ |
||
102 | public function postToQueue(JobInterface $job, $index): bool |
||
110 | |||
111 | /** |
||
112 | * @inheritdoc |
||
113 | */ |
||
114 | protected function releaseJob(JobInterface $job): bool |
||
121 | |||
122 | /** |
||
123 | * @inheritdoc |
||
124 | */ |
||
125 | public function getSize(): int |
||
131 | |||
132 | /** |
||
133 | * @inheritdoc |
||
134 | */ |
||
135 | public function purge(): bool |
||
142 | } |
||
143 |