1 | <?php |
||
5 | class BusQue |
||
6 | { |
||
7 | |||
8 | private $implementation; |
||
9 | |||
10 | 17 | public function __construct(Implementation $implementation) |
|
14 | |||
15 | 1 | public function getQueueName($command): string |
|
19 | |||
20 | 1 | public function serializeCommand($command): string |
|
24 | |||
25 | 2 | public function unserializeCommand(string $serialized) |
|
29 | |||
30 | 1 | public function generateCommandId($command): string |
|
34 | |||
35 | 1 | public function queueCommand($command, string $commandId = null) |
|
39 | |||
40 | 1 | public function scheduleCommand($command, \DateTime $dateTime, string $commandId = null) |
|
44 | |||
45 | 1 | public function getCommandStatus(string $queueName, string $commandId): string |
|
49 | |||
50 | 1 | public function getQueuedCount(string $queueName): int |
|
54 | |||
55 | 1 | public function purgeCommand(string $queueName, string $commandId) |
|
59 | |||
60 | 1 | public function clearQueue(string $queueName) |
|
64 | |||
65 | 1 | public function deleteQueue(string $queueName) |
|
69 | |||
70 | 1 | public function listQueues(): array |
|
74 | |||
75 | 1 | public function listQueuedIds(string $queueName, int $offset = 0, int $limit = 10): array |
|
79 | |||
80 | 1 | public function getInProgressCount(string $queueName): int |
|
84 | |||
85 | 1 | public function listInProgressIds(string $queueName, int $offset = 0, int $limit = 10): array |
|
89 | |||
90 | 1 | public function getCommand(string $queueName, string $id) |
|
95 | |||
96 | public function workQueue(string $queueName, int $n = null, int $time = null) |
||
100 | |||
101 | public function workSchedule(int $n = null, int $time = null) |
||
105 | } |
||
106 |