PHP 클래스 Google\Cloud\ExponentialBackoff

파일 보기 프로젝트 열기: GoogleCloudPlatform/gcloud-php 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( integer $retries = null, callable $retryFunction = null )
execute ( callable $function, array $arguments = [] ) : mixed Executes the retry process.
setDelayFunction ( callable $delayFunction ) : void

비공개 메소드들

메소드 설명
calculateDelay ( integer $attempt ) : integer Calculates exponential delay.

메소드 상세

__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

execute() 공개 메소드

Executes the retry process.
public execute ( callable $function, array $arguments = [] ) : mixed
$function callable
$arguments array [optional]
리턴 mixed

setDelayFunction() 공개 메소드

public setDelayFunction ( callable $delayFunction ) : void
$delayFunction callable
리턴 void