Documentation

No matching pages.

API

Config

Facade

Lifecycle

Class: RetryInterceptor

Full name: Azera\Aop\RetryInterceptor

Retries methods marked with Retry on failure.

times is the total number of attempts (including the first). Between attempts the interceptor sleeps for backoff milliseconds. If every attempt fails, the last exception is re-thrown.

Explicit (pipeline) calls have no attribute; defaultTimes / defaultBackoff apply.

Public methods

__construct() ·

public function __construct(Psr\Log\LoggerInterface|null $logger = null, int $defaultTimes = 3, int $defaultBackoff = 0): mixed

Parameters

Name Type Default Description
$logger Psr\Log\LoggerInterface|null null
$defaultTimes int 3
$defaultBackoff int 0

Return value

  • Type: mixed

intercept() ·

public function intercept(Azera\Aop\Invocation $invocation, callable $next): mixed

Parameters

Name Type Default Description
$invocation Invocation -
$next callable -

Return value

  • Type: mixed

Back to the Index