public static class Decorators.DecorateCallable<T>
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
T |
call() |
java.util.concurrent.Callable<T> |
decorate() |
Decorators.DecorateCallable<T> |
withBulkhead(io.github.resilience4j.bulkhead.Bulkhead bulkhead) |
Decorators.DecorateCallable<T> |
withCircuitBreaker(io.github.resilience4j.circuitbreaker.CircuitBreaker circuitBreaker) |
Decorators.DecorateCallable<T> |
withFallback(java.util.function.BiFunction<T,java.lang.Throwable,T> handler) |
<X extends java.lang.Throwable> |
withFallback(java.lang.Class<X> exceptionType,
java.util.function.Function<java.lang.Throwable,T> exceptionHandler) |
Decorators.DecorateCallable<T> |
withFallback(java.util.function.Function<java.lang.Throwable,T> exceptionHandler) |
Decorators.DecorateCallable<T> |
withFallback(java.util.List<java.lang.Class<? extends java.lang.Throwable>> exceptionTypes,
java.util.function.Function<java.lang.Throwable,T> exceptionHandler) |
Decorators.DecorateCallable<T> |
withFallback(java.util.function.Predicate<T> resultPredicate,
java.util.function.UnaryOperator<T> resultHandler) |
Decorators.DecorateCallable<T> |
withRateLimiter(io.github.resilience4j.ratelimiter.RateLimiter rateLimiter) |
Decorators.DecorateCallable<T> |
withRateLimiter(io.github.resilience4j.ratelimiter.RateLimiter rateLimiter,
int permits) |
Decorators.DecorateCallable<T> |
withRetry(io.github.resilience4j.retry.Retry retryContext) |
Decorators.DecorateCompletionStage<T> |
withThreadPoolBulkhead(io.github.resilience4j.bulkhead.ThreadPoolBulkhead threadPoolBulkhead) |
public Decorators.DecorateCallable<T> withCircuitBreaker(io.github.resilience4j.circuitbreaker.CircuitBreaker circuitBreaker)
public Decorators.DecorateCallable<T> withRetry(io.github.resilience4j.retry.Retry retryContext)
public Decorators.DecorateCallable<T> withRateLimiter(io.github.resilience4j.ratelimiter.RateLimiter rateLimiter)
public Decorators.DecorateCallable<T> withRateLimiter(io.github.resilience4j.ratelimiter.RateLimiter rateLimiter, int permits)
public Decorators.DecorateCallable<T> withBulkhead(io.github.resilience4j.bulkhead.Bulkhead bulkhead)
public Decorators.DecorateCallable<T> withFallback(java.util.function.BiFunction<T,java.lang.Throwable,T> handler)
public Decorators.DecorateCallable<T> withFallback(java.util.function.Predicate<T> resultPredicate, java.util.function.UnaryOperator<T> resultHandler)
public Decorators.DecorateCallable<T> withFallback(java.util.List<java.lang.Class<? extends java.lang.Throwable>> exceptionTypes, java.util.function.Function<java.lang.Throwable,T> exceptionHandler)
public Decorators.DecorateCallable<T> withFallback(java.util.function.Function<java.lang.Throwable,T> exceptionHandler)
public <X extends java.lang.Throwable> Decorators.DecorateCallable<T> withFallback(java.lang.Class<X> exceptionType, java.util.function.Function<java.lang.Throwable,T> exceptionHandler)
public Decorators.DecorateCompletionStage<T> withThreadPoolBulkhead(io.github.resilience4j.bulkhead.ThreadPoolBulkhead threadPoolBulkhead)
public java.util.concurrent.Callable<T> decorate()
public T call() throws java.lang.Exception
java.lang.Exception