final class BackoffResult implements Decision

Methods

__construct(bool $allowed, int $failures, int $retryAfterMicroseconds)

Create a new backoff result.

bool
allowed()

Determine if the operation was allowed.

bool
denied()

Determine if the operation was denied.

int
failures()

Get the recorded number of consecutive failures.

int
retryAfter()

Get the number of seconds until the operation may be retried.

Details

at line 15
__construct(bool $allowed, int $failures, int $retryAfterMicroseconds)

Create a new backoff result.

Parameters

bool $allowed
int $failures
int $retryAfterMicroseconds

at line 40
bool allowed()

Determine if the operation was allowed.

Return Value

bool

at line 48
bool denied()

Determine if the operation was denied.

Return Value

bool

at line 56
int failures()

Get the recorded number of consecutive failures.

Return Value

int

at line 64
int retryAfter()

Get the number of seconds until the operation may be retried.

Return Value

int