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 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