Uses of Class
cloud.opencode.base.core.retry.Retry
Packages that use Retry
Package
Description
Retry utilities with configurable backoff strategies.
-
Uses of Retry in cloud.opencode.base.core.retry
Methods in cloud.opencode.base.core.retry that return RetryModifier and TypeMethodDescriptionSet a predicate to abort retry immediately when matched.Set the exception type to abort retry immediately.Retry.backoff(BackoffStrategy backoff) Set the backoff strategy.Set a fixed delay between retries (convenience forbackoff(BackoffStrategy.fixed(delay))).Retry.exponentialBackoff(Duration initialDelay, double multiplier) Set an exponential backoff strategy (convenience method).Retry.maxAttempts(int maxAttempts) Set the maximum number of attempts (including the initial attempt).Set the maximum delay cap.static <T> Retry<T> Create a new Retry builder for the given task.Retry.onExhausted(Consumer<Throwable> listener) Set a callback invoked when all retry attempts are exhausted.Retry.onRetry(BiConsumer<Integer, Throwable> listener) Set a callback invoked before each retry attempt.Set a callback invoked when the task succeeds.Set the exception type to retry on (convenience forretryOn(type::isInstance)).Set a predicate to determine if a given exception should trigger a retry.Retry.retryOnAny(Class<? extends Throwable>... exceptionTypes) Set multiple exception types to retry on.Retry.retryOnResult(Predicate<T> predicate) Set a predicate to retry based on the task result.Set a total timeout for all retry attempts combined.static <T> Retry<T> Retry.withConfig(Callable<T> task, RetryConfig config) Create a Retry instance from aRetryConfig.