|
| 1 | +<?php |
| 2 | + |
| 3 | +declare(strict_types=1); |
| 4 | + |
| 5 | +namespace Enqueue\Monitoring; |
| 6 | + |
| 7 | +class ConsumerStopped extends Event |
| 8 | +{ |
| 9 | + /** |
| 10 | + * @var string[] |
| 11 | + */ |
| 12 | + protected $queues; |
| 13 | + |
| 14 | + /** |
| 15 | + * @var int |
| 16 | + */ |
| 17 | + protected $startedAtMs; |
| 18 | + |
| 19 | + /** |
| 20 | + * @var int |
| 21 | + */ |
| 22 | + protected $received; |
| 23 | + |
| 24 | + /** |
| 25 | + * @var int |
| 26 | + */ |
| 27 | + protected $acknowledged; |
| 28 | + |
| 29 | + /** |
| 30 | + * @var int |
| 31 | + */ |
| 32 | + protected $rejected; |
| 33 | + |
| 34 | + /** |
| 35 | + * @var int |
| 36 | + */ |
| 37 | + protected $requeued; |
| 38 | + |
| 39 | + /** |
| 40 | + * @var string |
| 41 | + */ |
| 42 | + protected $errorClass; |
| 43 | + |
| 44 | + /** |
| 45 | + * @var string |
| 46 | + */ |
| 47 | + protected $errorMessage; |
| 48 | + |
| 49 | + /** |
| 50 | + * @var int |
| 51 | + */ |
| 52 | + protected $errorCode; |
| 53 | + |
| 54 | + /** |
| 55 | + * @var string |
| 56 | + */ |
| 57 | + protected $errorFile; |
| 58 | + |
| 59 | + /** |
| 60 | + * @var int |
| 61 | + */ |
| 62 | + protected $errorLine; |
| 63 | + |
| 64 | + /** |
| 65 | + * @var string |
| 66 | + */ |
| 67 | + protected $trance; |
| 68 | + |
| 69 | + public function __construct( |
| 70 | + string $consumerId, |
| 71 | + int $timestampMs, |
| 72 | + array $queues, |
| 73 | + int $startedAtMs, |
| 74 | + int $received, |
| 75 | + int $acknowledged, |
| 76 | + int $rejected, |
| 77 | + int $requeued, |
| 78 | + string $errorClass = null, |
| 79 | + string $errorMessage = null, |
| 80 | + int $errorCode = null, |
| 81 | + string $errorFile = null, |
| 82 | + int $errorLine = null, |
| 83 | + string $trace = null |
| 84 | + ) { |
| 85 | + parent::__construct($consumerId, $timestampMs); |
| 86 | + |
| 87 | + $this->queues = $queues; |
| 88 | + $this->startedAtMs = $startedAtMs; |
| 89 | + $this->received = $received; |
| 90 | + $this->acknowledged = $acknowledged; |
| 91 | + $this->rejected = $rejected; |
| 92 | + $this->requeued = $requeued; |
| 93 | + |
| 94 | + $this->errorClass = $errorClass; |
| 95 | + $this->errorMessage = $errorMessage; |
| 96 | + $this->errorCode = $errorCode; |
| 97 | + $this->errorFile = $errorFile; |
| 98 | + $this->errorLine = $errorLine; |
| 99 | + $this->trance = $trace; |
| 100 | + } |
| 101 | + |
| 102 | + public function getQueues(): array |
| 103 | + { |
| 104 | + return $this->queues; |
| 105 | + } |
| 106 | + |
| 107 | + public function getStartedAtMs(): int |
| 108 | + { |
| 109 | + return $this->startedAtMs; |
| 110 | + } |
| 111 | + |
| 112 | + public function getReceived(): int |
| 113 | + { |
| 114 | + return $this->received; |
| 115 | + } |
| 116 | + |
| 117 | + public function getAcknowledged(): int |
| 118 | + { |
| 119 | + return $this->acknowledged; |
| 120 | + } |
| 121 | + |
| 122 | + public function getRejected(): int |
| 123 | + { |
| 124 | + return $this->rejected; |
| 125 | + } |
| 126 | + |
| 127 | + public function getRequeued(): int |
| 128 | + { |
| 129 | + return $this->requeued; |
| 130 | + } |
| 131 | + |
| 132 | + public function getErrorClass(): ?string |
| 133 | + { |
| 134 | + return $this->errorClass; |
| 135 | + } |
| 136 | + |
| 137 | + public function getErrorMessage(): ?string |
| 138 | + { |
| 139 | + return $this->errorMessage; |
| 140 | + } |
| 141 | + |
| 142 | + public function getErrorCode(): ?int |
| 143 | + { |
| 144 | + return $this->errorCode; |
| 145 | + } |
| 146 | + |
| 147 | + public function getErrorFile(): ?string |
| 148 | + { |
| 149 | + return $this->errorFile; |
| 150 | + } |
| 151 | + |
| 152 | + public function getErrorLine(): ?int |
| 153 | + { |
| 154 | + return $this->errorLine; |
| 155 | + } |
| 156 | + |
| 157 | + public function getTrance(): ?string |
| 158 | + { |
| 159 | + return $this->trance; |
| 160 | + } |
| 161 | +} |
0 commit comments