Google\Cloud\ExponentialBackoff::__construct PHP Метод

__construct() публичный Метод

public __construct ( integer $retries = null, callable $retryFunction = null )
$retries integer [optional] Number of retries for a failed request.
$retryFunction callable [optional] returns bool for whether or not to retry
    public function __construct($retries = null, callable $retryFunction = null)
    {
        $this->retries = $retries !== null ? (int) $retries : 3;
        $this->retryFunction = $retryFunction;
        // @todo revisit this approach
        // @codeCoverageIgnoreStart
        $this->delayFunction = function ($delay) {
            usleep($delay);
        };
        // @codeCoverageIgnoreEnd
    }