1
|
|
|
<?php declare(strict_types=1); |
2
|
|
|
|
3
|
|
|
namespace ApiClients\Client\RabbitMQ\Management\Resource; |
4
|
|
|
|
5
|
|
|
use ApiClients\Foundation\Hydrator\Annotations\EmptyResource; |
6
|
|
|
use ApiClients\Foundation\Hydrator\Annotations\Nested; |
7
|
|
|
use ApiClients\Foundation\Resource\AbstractResource; |
8
|
|
|
use DateTime; |
9
|
|
|
|
10
|
|
|
/** |
11
|
|
|
* @Nested( |
12
|
|
|
* messages_details="Details", |
13
|
|
|
* messages_ready_details="Details", |
14
|
|
|
* messages_unacknowledged_details="Details", |
15
|
|
|
* backing_queue_status="Queue\BackingQueueStatus" |
16
|
|
|
* ) |
17
|
|
|
* @EmptyResource("EmptyQueue") |
18
|
|
|
*/ |
19
|
|
|
abstract class Queue extends AbstractResource implements QueueInterface |
20
|
|
|
{ |
21
|
|
|
/** |
22
|
|
|
* @var int |
23
|
|
|
*/ |
24
|
|
|
protected $messages; |
25
|
|
|
|
26
|
|
|
/** |
27
|
|
|
* @var Details |
28
|
|
|
*/ |
29
|
|
|
protected $messages_details; |
30
|
|
|
|
31
|
|
|
/** |
32
|
|
|
* @var int |
33
|
|
|
*/ |
34
|
|
|
protected $messages_ready; |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* @var Details |
38
|
|
|
*/ |
39
|
|
|
protected $messages_ready_details; |
40
|
|
|
|
41
|
|
|
/** |
42
|
|
|
* @var int |
43
|
|
|
*/ |
44
|
|
|
protected $messages_unacknowledged; |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* @var Details |
48
|
|
|
*/ |
49
|
|
|
protected $messages_unacknowledged_details; |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* @var DateTime |
53
|
|
|
*/ |
54
|
|
|
protected $idle_since; |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* @var mixed |
58
|
|
|
*/ |
59
|
|
|
protected $consumer_utilisation; |
60
|
|
|
|
61
|
|
|
/** |
62
|
|
|
* @var mixed |
63
|
|
|
*/ |
64
|
|
|
protected $policy; |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* @var mixed |
68
|
|
|
*/ |
69
|
|
|
protected $exclusive_consumer_tag; |
70
|
|
|
|
71
|
|
|
/** |
72
|
|
|
* @var int |
73
|
|
|
*/ |
74
|
|
|
protected $consumers; |
75
|
|
|
|
76
|
|
|
/** |
77
|
|
|
* @var mixed |
78
|
|
|
*/ |
79
|
|
|
protected $recoverable_slaves; |
80
|
|
|
|
81
|
|
|
/** |
82
|
|
|
* @var string |
83
|
|
|
*/ |
84
|
|
|
protected $state; |
85
|
|
|
|
86
|
|
|
/** |
87
|
|
|
* @var int |
88
|
|
|
*/ |
89
|
|
|
protected $messages_ram; |
90
|
|
|
|
91
|
|
|
/** |
92
|
|
|
* @var int |
93
|
|
|
*/ |
94
|
|
|
protected $messages_ready_ram; |
95
|
|
|
|
96
|
|
|
/** |
97
|
|
|
* @var int |
98
|
|
|
*/ |
99
|
|
|
protected $messages_unacknowledged_ram; |
100
|
|
|
|
101
|
|
|
/** |
102
|
|
|
* @var int |
103
|
|
|
*/ |
104
|
|
|
protected $messages_persistent; |
105
|
|
|
|
106
|
|
|
/** |
107
|
|
|
* @var int |
108
|
|
|
*/ |
109
|
|
|
protected $message_bytes; |
110
|
|
|
|
111
|
|
|
/** |
112
|
|
|
* @var int |
113
|
|
|
*/ |
114
|
|
|
protected $message_bytes_ready; |
115
|
|
|
|
116
|
|
|
/** |
117
|
|
|
* @var int |
118
|
|
|
*/ |
119
|
|
|
protected $message_bytes_unacknowledged; |
120
|
|
|
|
121
|
|
|
/** |
122
|
|
|
* @var int |
123
|
|
|
*/ |
124
|
|
|
protected $message_bytes_ram; |
125
|
|
|
|
126
|
|
|
/** |
127
|
|
|
* @var int |
128
|
|
|
*/ |
129
|
|
|
protected $message_bytes_persistent; |
130
|
|
|
|
131
|
|
|
/** |
132
|
|
|
* @var DateTime |
133
|
|
|
*/ |
134
|
|
|
protected $head_message_timestamp; |
135
|
|
|
|
136
|
|
|
/** |
137
|
|
|
* @var int |
138
|
|
|
*/ |
139
|
|
|
protected $disk_reads; |
140
|
|
|
|
141
|
|
|
/** |
142
|
|
|
* @var int |
143
|
|
|
*/ |
144
|
|
|
protected $disk_writes; |
145
|
|
|
|
146
|
|
|
/** |
147
|
|
|
* @var Queue\BackingQueueStatus |
148
|
|
|
*/ |
149
|
|
|
protected $backing_queue_status; |
150
|
|
|
|
151
|
|
|
/** |
152
|
|
|
* @var string |
153
|
|
|
*/ |
154
|
|
|
protected $name; |
155
|
|
|
|
156
|
|
|
/** |
157
|
|
|
* @var string |
158
|
|
|
*/ |
159
|
|
|
protected $vhost; |
160
|
|
|
|
161
|
|
|
/** |
162
|
|
|
* @var bool |
163
|
|
|
*/ |
164
|
|
|
protected $durable; |
165
|
|
|
|
166
|
|
|
/** |
167
|
|
|
* @var bool |
168
|
|
|
*/ |
169
|
|
|
protected $auto_delete; |
170
|
|
|
|
171
|
|
|
/** |
172
|
|
|
* @var bool |
173
|
|
|
*/ |
174
|
|
|
protected $exclusive; |
175
|
|
|
|
176
|
|
|
/** |
177
|
|
|
* @var array |
178
|
|
|
*/ |
179
|
|
|
protected $arguments; |
180
|
|
|
|
181
|
|
|
/** |
182
|
|
|
* @var string |
183
|
|
|
*/ |
184
|
|
|
protected $node; |
185
|
|
|
|
186
|
|
|
/** |
187
|
|
|
* @return int |
188
|
|
|
*/ |
189
|
|
|
public function messages() : int |
190
|
|
|
{ |
191
|
|
|
return $this->messages; |
192
|
|
|
} |
193
|
|
|
|
194
|
|
|
/** |
195
|
|
|
* @return Details |
196
|
|
|
*/ |
197
|
|
|
public function messagesDetails() : Details |
198
|
|
|
{ |
199
|
|
|
return $this->messages_details; |
200
|
|
|
} |
201
|
|
|
|
202
|
|
|
/** |
203
|
|
|
* @return int |
204
|
|
|
*/ |
205
|
|
|
public function messagesReady() : int |
206
|
|
|
{ |
207
|
|
|
return $this->messages_ready; |
208
|
|
|
} |
209
|
|
|
|
210
|
|
|
/** |
211
|
|
|
* @return Details |
212
|
|
|
*/ |
213
|
|
|
public function messagesReadyDetails() : Details |
214
|
|
|
{ |
215
|
|
|
return $this->messages_ready_details; |
216
|
|
|
} |
217
|
|
|
|
218
|
|
|
/** |
219
|
|
|
* @return int |
220
|
|
|
*/ |
221
|
|
|
public function messagesUnacknowledged() : int |
222
|
|
|
{ |
223
|
|
|
return $this->messages_unacknowledged; |
224
|
|
|
} |
225
|
|
|
|
226
|
|
|
/** |
227
|
|
|
* @return Details |
228
|
|
|
*/ |
229
|
|
|
public function messagesUnacknowledgedDetails() : Details |
230
|
|
|
{ |
231
|
|
|
return $this->messages_unacknowledged_details; |
232
|
|
|
} |
233
|
|
|
|
234
|
|
|
/** |
235
|
|
|
* @return DateTime |
236
|
|
|
*/ |
237
|
|
|
public function idleSince() : DateTime |
238
|
|
|
{ |
239
|
|
|
return $this->idle_since; |
240
|
|
|
} |
241
|
|
|
|
242
|
|
|
/** |
243
|
|
|
* @return mixed |
244
|
|
|
*/ |
245
|
|
|
public function consumerUtilisation() : mixed |
246
|
|
|
{ |
247
|
|
|
return $this->consumer_utilisation; |
248
|
|
|
} |
249
|
|
|
|
250
|
|
|
/** |
251
|
|
|
* @return mixed |
252
|
|
|
*/ |
253
|
|
|
public function policy() : mixed |
254
|
|
|
{ |
255
|
|
|
return $this->policy; |
256
|
|
|
} |
257
|
|
|
|
258
|
|
|
/** |
259
|
|
|
* @return mixed |
260
|
|
|
*/ |
261
|
|
|
public function exclusiveConsumerTag() : mixed |
262
|
|
|
{ |
263
|
|
|
return $this->exclusive_consumer_tag; |
264
|
|
|
} |
265
|
|
|
|
266
|
|
|
/** |
267
|
|
|
* @return int |
268
|
|
|
*/ |
269
|
|
|
public function consumers() : int |
270
|
|
|
{ |
271
|
|
|
return $this->consumers; |
272
|
|
|
} |
273
|
|
|
|
274
|
|
|
/** |
275
|
|
|
* @return mixed |
276
|
|
|
*/ |
277
|
|
|
public function recoverableSlaves() : mixed |
278
|
|
|
{ |
279
|
|
|
return $this->recoverable_slaves; |
280
|
|
|
} |
281
|
|
|
|
282
|
|
|
/** |
283
|
|
|
* @return string |
284
|
|
|
*/ |
285
|
|
|
public function state() : string |
286
|
|
|
{ |
287
|
|
|
return $this->state; |
288
|
|
|
} |
289
|
|
|
|
290
|
|
|
/** |
291
|
|
|
* @return int |
292
|
|
|
*/ |
293
|
|
|
public function messagesRam() : int |
294
|
|
|
{ |
295
|
|
|
return $this->messages_ram; |
296
|
|
|
} |
297
|
|
|
|
298
|
|
|
/** |
299
|
|
|
* @return int |
300
|
|
|
*/ |
301
|
|
|
public function messagesReadyRam() : int |
302
|
|
|
{ |
303
|
|
|
return $this->messages_ready_ram; |
304
|
|
|
} |
305
|
|
|
|
306
|
|
|
/** |
307
|
|
|
* @return int |
308
|
|
|
*/ |
309
|
|
|
public function messagesUnacknowledgedRam() : int |
310
|
|
|
{ |
311
|
|
|
return $this->messages_unacknowledged_ram; |
312
|
|
|
} |
313
|
|
|
|
314
|
|
|
/** |
315
|
|
|
* @return int |
316
|
|
|
*/ |
317
|
|
|
public function messagesPersistent() : int |
318
|
|
|
{ |
319
|
|
|
return $this->messages_persistent; |
320
|
|
|
} |
321
|
|
|
|
322
|
|
|
/** |
323
|
|
|
* @return int |
324
|
|
|
*/ |
325
|
|
|
public function messageBytes() : int |
326
|
|
|
{ |
327
|
|
|
return $this->message_bytes; |
328
|
|
|
} |
329
|
|
|
|
330
|
|
|
/** |
331
|
|
|
* @return int |
332
|
|
|
*/ |
333
|
|
|
public function messageBytesReady() : int |
334
|
|
|
{ |
335
|
|
|
return $this->message_bytes_ready; |
336
|
|
|
} |
337
|
|
|
|
338
|
|
|
/** |
339
|
|
|
* @return int |
340
|
|
|
*/ |
341
|
|
|
public function messageBytesUnacknowledged() : int |
342
|
|
|
{ |
343
|
|
|
return $this->message_bytes_unacknowledged; |
344
|
|
|
} |
345
|
|
|
|
346
|
|
|
/** |
347
|
|
|
* @return int |
348
|
|
|
*/ |
349
|
|
|
public function messageBytesRam() : int |
350
|
|
|
{ |
351
|
|
|
return $this->message_bytes_ram; |
352
|
|
|
} |
353
|
|
|
|
354
|
|
|
/** |
355
|
|
|
* @return int |
356
|
|
|
*/ |
357
|
|
|
public function messageBytesPersistent() : int |
358
|
|
|
{ |
359
|
|
|
return $this->message_bytes_persistent; |
360
|
|
|
} |
361
|
|
|
|
362
|
|
|
/** |
363
|
|
|
* @return DateTime |
364
|
|
|
*/ |
365
|
|
|
public function headMessageTimestamp() : DateTime |
366
|
|
|
{ |
367
|
|
|
return $this->head_message_timestamp; |
368
|
|
|
} |
369
|
|
|
|
370
|
|
|
/** |
371
|
|
|
* @return int |
372
|
|
|
*/ |
373
|
|
|
public function diskReads() : int |
374
|
|
|
{ |
375
|
|
|
return $this->disk_reads; |
376
|
|
|
} |
377
|
|
|
|
378
|
|
|
/** |
379
|
|
|
* @return int |
380
|
|
|
*/ |
381
|
|
|
public function diskWrites() : int |
382
|
|
|
{ |
383
|
|
|
return $this->disk_writes; |
384
|
|
|
} |
385
|
|
|
|
386
|
|
|
/** |
387
|
|
|
* @return Queue\BackingQueueStatus |
388
|
|
|
*/ |
389
|
|
|
public function backingQueueStatus() : Queue\BackingQueueStatus |
390
|
|
|
{ |
391
|
|
|
return $this->backing_queue_status; |
392
|
|
|
} |
393
|
|
|
|
394
|
|
|
/** |
395
|
|
|
* @return string |
396
|
|
|
*/ |
397
|
|
|
public function name() : string |
398
|
|
|
{ |
399
|
|
|
return $this->name; |
400
|
|
|
} |
401
|
|
|
|
402
|
|
|
/** |
403
|
|
|
* @return string |
404
|
|
|
*/ |
405
|
|
|
public function vhost() : string |
406
|
|
|
{ |
407
|
|
|
return $this->vhost; |
408
|
|
|
} |
409
|
|
|
|
410
|
|
|
/** |
411
|
|
|
* @return bool |
412
|
|
|
*/ |
413
|
|
|
public function durable() : bool |
414
|
|
|
{ |
415
|
|
|
return $this->durable; |
416
|
|
|
} |
417
|
|
|
|
418
|
|
|
/** |
419
|
|
|
* @return bool |
420
|
|
|
*/ |
421
|
|
|
public function autoDelete() : bool |
422
|
|
|
{ |
423
|
|
|
return $this->auto_delete; |
424
|
|
|
} |
425
|
|
|
|
426
|
|
|
/** |
427
|
|
|
* @return bool |
428
|
|
|
*/ |
429
|
|
|
public function exclusive() : bool |
430
|
|
|
{ |
431
|
|
|
return $this->exclusive; |
432
|
|
|
} |
433
|
|
|
|
434
|
|
|
/** |
435
|
|
|
* @return array |
436
|
|
|
*/ |
437
|
|
|
public function arguments() : array |
438
|
|
|
{ |
439
|
|
|
return $this->arguments; |
440
|
|
|
} |
441
|
|
|
|
442
|
|
|
/** |
443
|
|
|
* @return string |
444
|
|
|
*/ |
445
|
|
|
public function node() : string |
446
|
|
|
{ |
447
|
|
|
return $this->node; |
448
|
|
|
} |
449
|
|
|
} |
450
|
|
|
|