RetryOnFailureInterceptor
in package
implements
MethodInterceptor
FinalYes
Table of Contents
Interfaces
- MethodInterceptor
Properties
- $attempts : int<0, max>
- The number of attempts made so far.
- $backoff : array<int, int<0, max>>
- The backoff strategy.
- $initialized : bool
- Whether the interceptor has been initialized.
- $times : null|int<0, max>
- The number of times to retry.
Methods
Properties
$attempts
The number of attempts made so far.
private
int<0, max>
$attempts
= 0
$backoff
The backoff strategy.
private
array<int, int<0, max>>
$backoff
= []
$initialized
Whether the interceptor has been initialized.
private
bool
$initialized
= false
$times
The number of times to retry.
private
null|int<0, max>
$times
= null
Methods
invoke()
public
invoke(MethodInvocation $invocation) : mixed
Parameters
- $invocation : MethodInvocation
retry()
Retry an operation a given number of times.
private
retry(MethodInvocation $invocation, RetryOnFailure $attribute) : mixed
Parameters
- $invocation : MethodInvocation
-
The method invocation
- $attribute : RetryOnFailure
-
The attribute
Return values
mixed —The result of the method invocation