Класс ErrorCodeWaitStrategy
Реализует стратегию повторной попытки, основанную на кодах ошибок БД и интервале ожидания.
Пространство имён: Cake\Database\Retry
Краткое описание свойств
- $errorCodes protected
int[] - $retryInterval protected
int
Краткое описание методов
-
__construct() public
-
shouldRetry() public
Возвращает true, если действие можно повторить, в противном случае — false.
Подробное описание методов
__construct() public
__construct(int[] $errorCodes, int $retryInterval)
Параметры
-
int[]$errorCodes Код ошибки БД, разрешающий повторную попытку
-
int$retryInterval Секунды ожидания перед следующей попыткой, 0 — без ожидания.
shouldRetry() public
shouldRetry(Exception $exception, int $retryCount): bool
Возвращает true, если действие можно повторить, в противном случае — false.
Параметры
-
Exception$exception -
int$retryCount
Возвращает
boolПодробное описание свойств
$errorCodes protected
Тип
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.2/class-Cake.Database.Retry.ErrorCodeWaitStrategy.html