Uses of Class
com.github.mizosoft.methanol.RetryInterceptor.Builder
Packages that use RetryInterceptor.Builder
-
Uses of RetryInterceptor.Builder in com.github.mizosoft.methanol
Methods in com.github.mizosoft.methanol that return RetryInterceptor.BuilderModifier and TypeMethodDescriptionRetryInterceptor.Builder.backoff(RetryInterceptor.BackoffStrategy backoffStrategy) Specifies theBackoffStrategyto apply every retry.RetryInterceptor.Builder.beginWith(Function<HttpRequest, HttpRequest> requestModifier) Specifies the request modifier to be applied before the request is sent for the first time (attempt 0, not a retry).RetryInterceptor.Builder.listener(RetryInterceptor.Listener listener) Sets the listener for retry events.RetryInterceptor.Builder.maxRetries(int maxRetries) Specifies the maximum times the interceptor is allowed to retry the request.static RetryInterceptor.BuilderRetryInterceptor.newBuilder()Returns a new builder ofRetryInterceptorinstances.RetryInterceptor.Builder.on(Predicate<RetryInterceptor.Context<?>> predicate) Specifies that the interceptor is to retry the request if the retryRetryInterceptor.Contextsatisfies the given predicate.RetryInterceptor.Builder.on(Predicate<RetryInterceptor.Context<?>> predicate, Function<RetryInterceptor.Context<?>, HttpRequest> requestModifier) Specifies that the interceptor is to retry the request, after applying the given request modifier, if the retryRetryInterceptor.Contextsatisfies the given predicate.final RetryInterceptor.BuilderRetryInterceptor.Builder.onException(Class<? extends Throwable>... exceptionTypes) Specifies that the interceptor is to retry the request if an exception with any of the given types is thrown.RetryInterceptor.Builder.onException(Predicate<Throwable> exceptionPredicate) Specifies that the interceptor is to retry the request if an exception that satisfies the given predicate is thrown.RetryInterceptor.Builder.onException(Predicate<Throwable> exceptionPredicate, Function<RetryInterceptor.Context<?>, HttpRequest> requestModifier) Specifies that the interceptor is to retry the request, after applying the given request modifier, if an exception that satisfies the given predicate is thrown.RetryInterceptor.Builder.onException(Set<Class<? extends Throwable>> exceptionTypes, Function<RetryInterceptor.Context<?>, HttpRequest> requestModifier) Specifies that the interceptor is to retry the request, after applying the given request modifier, if an exception with any of the given types is thrown.RetryInterceptor.Builder.onResponse(Predicate<HttpResponse<?>> responsePredicate) Specifies that the interceptor is to retry the request if a response that satisfies the given predicate is received.RetryInterceptor.Builder.onResponse(Predicate<HttpResponse<?>> responsePredicate, Function<RetryInterceptor.Context<?>, HttpRequest> requestModifier) Specifies that the interceptor is to retry the request, after applying the given request modifier, if a response that satisfies the given predicate is received.RetryInterceptor.Builder.onStatus(int... codes) Specifies that the interceptor is to retry the request if a response with any of the given status codes is received.Specifies that the interceptor is to retry the request if a response whose code satisfies the given predicate is received.RetryInterceptor.Builder.onStatus(Predicate<Integer> statusPredicate, Function<RetryInterceptor.Context<?>, HttpRequest> requestModifier) Specifies that the interceptor is to retry the request, after applying the given request modifier, if a response whose code satisfies the given predicate is received.RetryInterceptor.Builder.onStatus(Set<Integer> codes, Function<RetryInterceptor.Context<?>, HttpRequest> requestModifier) Specifies that the interceptor is to retry the request, after applying the given request modifier, if a response with any of the given status codes is received.RetryInterceptor.Builder.retryNonIdempotent()Specifies that requests that are not idempotent are to be retried.RetryInterceptor.Builder.throwOnExhaustion()Specifies that the interceptor is to throw anHttpRetriesExhaustedExceptionif the maximum number of retries is exceeded, with the last-thrown exception (if any) added as a suppressed exception.Sets a timeout for the entire retry process.