Class Decorators.DecorateCallable<T>
java.lang.Object
io.github.resilience4j.decorators.Decorators.DecorateCallable<T>
- Enclosing interface:
- Decorators
-
Method Summary
Modifier and TypeMethodDescriptioncall()
decorate()
withBulkhead
(io.github.resilience4j.bulkhead.Bulkhead bulkhead) withCircuitBreaker
(io.github.resilience4j.circuitbreaker.CircuitBreaker circuitBreaker) <X extends Throwable>
Decorators.DecorateCallable<T>withFallback
(Class<X> exceptionType, Function<Throwable, T> exceptionHandler) withFallback
(BiFunction<T, Throwable, T> handler) withFallback
(Function<Throwable, T> exceptionHandler) withFallback
(Predicate<T> resultPredicate, UnaryOperator<T> resultHandler) withFallback
(List<Class<? extends Throwable>> exceptionTypes, Function<Throwable, T> exceptionHandler) withRateLimiter
(io.github.resilience4j.ratelimiter.RateLimiter rateLimiter) withRateLimiter
(io.github.resilience4j.ratelimiter.RateLimiter rateLimiter, int permits) withRetry
(io.github.resilience4j.retry.Retry retryContext) withThreadPoolBulkhead
(io.github.resilience4j.bulkhead.ThreadPoolBulkhead threadPoolBulkhead)
-
Method Details
-
withCircuitBreaker
public Decorators.DecorateCallable<T> withCircuitBreaker(io.github.resilience4j.circuitbreaker.CircuitBreaker circuitBreaker) -
withRetry
-
withRateLimiter
public Decorators.DecorateCallable<T> withRateLimiter(io.github.resilience4j.ratelimiter.RateLimiter rateLimiter) -
withRateLimiter
public Decorators.DecorateCallable<T> withRateLimiter(io.github.resilience4j.ratelimiter.RateLimiter rateLimiter, int permits) -
withBulkhead
public Decorators.DecorateCallable<T> withBulkhead(io.github.resilience4j.bulkhead.Bulkhead bulkhead) -
withFallback
-
withFallback
public Decorators.DecorateCallable<T> withFallback(Predicate<T> resultPredicate, UnaryOperator<T> resultHandler) -
withFallback
-
withFallback
-
withFallback
-
withThreadPoolBulkhead
public Decorators.DecorateCompletionStage<T> withThreadPoolBulkhead(io.github.resilience4j.bulkhead.ThreadPoolBulkhead threadPoolBulkhead) -
decorate
-
call
- Throws:
Exception
-