Lines Matching refs:this
110 $this->delay = $config['initial_delay'];
120 $this->maxDelay = $config['max_delay'];
130 $this->factor = $config['factor'];
140 $this->jitter = $config['jitter'];
149 $this->maxAttempts += $config['retries'];
158 $this->action = $action;
159 $this->arguments = $arguments;
169 return $this->attempts < $this->maxAttempts;
180 while ($this->attempt()) {
182 return call_user_func_array($this->action, $this->arguments);
184 $allowedRetries = $this->allowedRetries(
189 if (!$this->canAttempt() || !$allowedRetries) {
194 $this->maxAttempts = min(
195 $this->maxAttempts,
196 $this->attempts + $allowedRetries
214 if (!$this->canAttempt()) {
218 if ($this->attempts > 0) {
219 $this->backOff();
222 $this->attempts++;
231 $delay = $this->getDelay();
243 $jitter = $this->getJitter();
244 $factor = $this->attempts > 1 ? $this->factor + $jitter : 1 + abs($jitter);
246 return $this->delay = min($this->maxDelay, $this->delay * $factor);
257 return $this->jitter * 2 * mt_rand() / mt_getrandmax() - $this->jitter;
269 if (isset($this->retryMap[$code])) {
270 return $this->retryMap[$code];
275 isset($errors[0]['reason'], $this->retryMap[$errors[0]['reason']])
277 return $this->retryMap[$errors[0]['reason']];
285 $this->retryMap = $retryMap;