Debian Codegraph @

lib/3rdParty/composer/illuminate/contracts/Queue/Queue.php

raw symbols SCIP
1 <?php
2
3 namespace Illuminate\Contracts\Queue;
4
5 /**
6 * @method int pendingSize(string|null $queue = null)
7 * @method int delayedSize(string|null $queue = null)
8 * @method int reservedSize(string|null $queue = null)
9 * @method int|null creationTimeOfOldestPendingJob(string|null $queue = null)
10 */
11 interface Queue
12 {
13 /**
14 * Get the size of the queue.
15 *
16 * @param string|null $queue
17 * @return int
18 */
19 public function size($queue = null);
20
21 /**
22 * Push a new job onto the queue.
23 *
24 * @param string|object $job
25 * @param mixed $data
26 * @param string|null $queue
27 * @return mixed
28 */
29 public function push($job, $data = '', $queue = null);
30
31 /**
32 * Push a new job onto the queue.
33 *
34 * @param string $queue
35 * @param string|object $job
36 * @param mixed $data
37 * @return mixed
38 */
39 public function pushOn($queue, $job, $data = '');
40
41 /**
42 * Push a raw payload onto the queue.
43 *
44 * @param string $payload
45 * @param string|null $queue
46 * @return mixed
47 */
48 public function pushRaw($payload, $queue = null, array $options = []);
49
50 /**
51 * Push a new job onto the queue after (n) seconds.
52 *
53 * @param \DateTimeInterface|\DateInterval|int $delay
54 * @param string|object $job
55 * @param mixed $data
56 * @param string|null $queue
57 * @return mixed
58 */
59 public function later($delay, $job, $data = '', $queue = null);
60
61 /**
62 * Push a new job onto a specific queue after (n) seconds.
63 *
64 * @param string $queue
65 * @param \DateTimeInterface|\DateInterval|int $delay
66 * @param string|object $job
67 * @param mixed $data
68 * @return mixed
69 */
70 public function laterOn($queue, $delay, $job, $data = '');
71
72 /**
73 * Push an array of jobs onto the queue.
74 *
75 * @param array $jobs
76 * @param mixed $data
77 * @param string|null $queue
78 * @return mixed
79 */
80 public function bulk($jobs, $data = '', $queue = null);
81
82 /**
83 * Pop the next job off of the queue.
84 *
85 * @param string|null $queue
86 * @return \Illuminate\Contracts\Queue\Job|null
87 */
88 public function pop($queue = null);
89
90 /**
91 * Get the connection name for the queue.
92 *
93 * @return string
94 */
95 public function getConnectionName();
96
97 /**
98 * Set the connection name for the queue.
99 *
100 * @param string $name
101 * @return $this
102 */
103 public function setConnectionName($name);
104 }