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) |
||
67 | |||
68 | /** |
||
69 | * @inheritdoc |
||
70 | */ |
||
71 | protected function deleteJob(JobInterface $job): bool |
||
75 | |||
76 | /** |
||
77 | * @inheritdoc |
||
78 | */ |
||
79 | protected function fetchJob() |
||
83 | |||
84 | /** |
||
85 | * @inheritdoc |
||
86 | */ |
||
87 | protected function postJob(JobInterface $job): bool |
||
92 | |||
93 | /** |
||
94 | * Post new job to a specific queue. |
||
95 | * @param JobInterface $job |
||
96 | * @param integer $index |
||
97 | * @return bool |
||
98 | */ |
||
99 | public function postToQueue(JobInterface $job, $index): bool |
||
107 | |||
108 | /** |
||
109 | * @inheritdoc |
||
110 | */ |
||
111 | protected function releaseJob(JobInterface $job): bool |
||
118 | |||
119 | /** |
||
120 | * @inheritdoc |
||
121 | */ |
||
122 | public function getSize(): int |
||
128 | |||
129 | /** |
||
130 | * @inheritdoc |
||
131 | */ |
||
132 | public function purge(): bool |
||
139 | } |
||
140 |