Documentation

No matching pages.

API

Config

Facade

Lifecycle

Class: Retry

Full name: Azera\Aop\Retry

Marks a method as retryable.

The RetryInterceptor retries the method on failure (Throwable) up to the specified number of times, with optional backoff between attempts.

Example:

#[Advised]
class ApiService
{
    #[Retry(times: 3, backoff: 100)]
    public function callExternalApi(): Response { ... }
}

Public Properties

  • public readonly int $times ·
  • public readonly int $backoff ·

Public methods

__construct() ·

public function __construct(int $times = 3, int $backoff = 0): mixed

Parameters

Name Type Default Description
$times int 3
$backoff int 0

Return value

  • Type: mixed

Back to the Index