|
iceberg-cpp
|
Utility class for running tasks with retry logic. More...
#include <retry_util.h>
Public Member Functions | |
| RetryRunner (RetryConfig config={}) | |
| Construct a RetryRunner with the given configuration. | |
| RetryRunner & | OnlyRetryOn (std::initializer_list< ErrorKind > error_kinds) |
| Specify error types that should trigger a retry. | |
| RetryRunner & | OnlyRetryOn (ErrorKind error_kind) |
| Specify a single error type that should trigger a retry. | |
| RetryRunner & | StopRetryOn (std::initializer_list< ErrorKind > error_kinds) |
| Specify error types that should stop retries immediately. | |
| RetryRunner & | StopRetryOn (ErrorKind error_kind) |
| Specify a single error type that should stop retries immediately. | |
| template<typename F > requires detail::RetryTask<F> | |
| auto | Run (F &&task, int32_t *attempt_counter=nullptr) -> detail::RetryTaskResult< F > |
| Run a task that returns a Result<T> | |
Utility class for running tasks with retry logic.
When retries are enabled (num_retries > 0), callers must explicitly configure retry policy with OnlyRetryOn(...) or StopRetryOn(...).
|
inline |
Specify a single error type that should trigger a retry.
|
inline |
Specify error types that should trigger a retry.
When set, only errors matching one of these kinds will be retried. All other errors will stop retries immediately.
|
inline |
Run a task that returns a Result<T>
When num_retries > 0, the retry policy must be configured explicitly via OnlyRetryOn(...) or StopRetryOn(...).
TODO: Replace attempt_counter with a metrics reporter once it is available.
|
inline |
Specify a single error type that should stop retries immediately.
|
inline |
Specify error types that should stop retries immediately.
When set, errors matching one of these kinds will not be retried. All other errors will be retried.