Class Decorators.DecorateCallable<T>
- java.lang.Object
-
- io.github.resilience4j.decorators.Decorators.DecorateCallable<T>
-
- Enclosing interface:
- Decorators
public static class Decorators.DecorateCallable<T> extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tcall()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)<X extends java.lang.Throwable>
Decorators.DecorateCallable<T>withFallback(java.lang.Class<X> exceptionType, java.util.function.Function<java.lang.Throwable,T> exceptionHandler)Decorators.DecorateCallable<T>withFallback(java.util.function.BiFunction<T,java.lang.Throwable,T> handler)Decorators.DecorateCallable<T>withFallback(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>withFallback(java.util.List<java.lang.Class<? extends java.lang.Throwable>> exceptionTypes, java.util.function.Function<java.lang.Throwable,T> exceptionHandler)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)
-
-
-
Method Detail
-
withCircuitBreaker
public Decorators.DecorateCallable<T> withCircuitBreaker(io.github.resilience4j.circuitbreaker.CircuitBreaker circuitBreaker)
-
withRetry
public Decorators.DecorateCallable<T> withRetry(io.github.resilience4j.retry.Retry retryContext)
-
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
public Decorators.DecorateCallable<T> withFallback(java.util.function.BiFunction<T,java.lang.Throwable,T> handler)
-
withFallback
public Decorators.DecorateCallable<T> withFallback(java.util.function.Predicate<T> resultPredicate, java.util.function.UnaryOperator<T> resultHandler)
-
withFallback
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)
-
withFallback
public Decorators.DecorateCallable<T> withFallback(java.util.function.Function<java.lang.Throwable,T> exceptionHandler)
-
withFallback
public <X extends java.lang.Throwable> Decorators.DecorateCallable<T> withFallback(java.lang.Class<X> exceptionType, java.util.function.Function<java.lang.Throwable,T> exceptionHandler)
-
withThreadPoolBulkhead
public Decorators.DecorateCompletionStage<T> withThreadPoolBulkhead(io.github.resilience4j.bulkhead.ThreadPoolBulkhead threadPoolBulkhead)
-
decorate
public java.util.concurrent.Callable<T> decorate()
-
call
public T call() throws java.lang.Exception
- Throws:
java.lang.Exception
-
-