Sets maximum attempts.
The first execution counts as attempt 1.
| n |
maximum attempts (must be positive). |
|
Result.ok(this retry instance), or Result.error(RetryError.INVALID_ARGUMENT) when n is not positive. |