Класс ErrorCodeWaitStrategy
Реализует стратегию повторных попыток, основанную на кодах ошибок БД и интервале ожидания.
Пространство имён: Cake\Database\Retry
Краткое описание свойств
- $errorCodes protected
array<int> - $retryInterval protected
int
Краткое описание методов
-
__construct() public
-
shouldRetry() public
Возвращает true, если действие можно повторить, в противном случае — false.
Подробное описание методов
__construct() public
__construct(array<int> $errorCodes, int $retryInterval)
Параметры
-
array<int>$errorCodes Коды ошибок БД, позволяющие повторить попытку
-
int$retryInterval Секунды ожидания перед следующей попыткой, 0 — без ожидания.
shouldRetry() public
shouldRetry(Exception $exception, int $retryCount): bool
Возвращает true, если действие можно повторить, в противном случае — false.
Параметры
-
Exception$exception -
int$retryCount
Возвращаемое значение
boolПодробное описание свойств
$errorCodes protected
Тип
array<int>$retryInterval protected
Тип
int
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.4/class-Cake.Database.Retry.ErrorCodeWaitStrategy.html