Class Decorators.DecorateCheckedSupplier<T>
- java.lang.Object
-
- io.github.resilience4j.decorators.Decorators.DecorateCheckedSupplier<T>
-
- Enclosing interface:
- Decorators
public static class Decorators.DecorateCheckedSupplier<T> extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.vavr.CheckedFunction0<T>decorate()Tget()Decorators.DecorateCheckedSupplier<T>withBulkhead(io.github.resilience4j.bulkhead.Bulkhead bulkhead)<K> Decorators.DecorateCheckedFunction<K,T>withCache(io.github.resilience4j.cache.Cache<K,T> cache)Decorators.DecorateCheckedSupplier<T>withCircuitBreaker(io.github.resilience4j.circuitbreaker.CircuitBreaker circuitBreaker)Decorators.DecorateCheckedSupplier<T>withFallback(io.vavr.CheckedFunction1<java.lang.Throwable,T> exceptionHandler)Decorators.DecorateCheckedSupplier<T>withFallback(io.vavr.CheckedFunction2<T,java.lang.Throwable,T> handler)<X extends java.lang.Throwable>
Decorators.DecorateCheckedSupplier<T>withFallback(java.lang.Class<X> exceptionType, io.vavr.CheckedFunction1<java.lang.Throwable,T> exceptionHandler)Decorators.DecorateCheckedSupplier<T>withFallback(java.util.function.Predicate<T> resultPredicate, io.vavr.CheckedFunction1<T,T> resultHandler)Decorators.DecorateCheckedSupplier<T>withFallback(java.util.List<java.lang.Class<? extends java.lang.Throwable>> exceptionTypes, io.vavr.CheckedFunction1<java.lang.Throwable,T> exceptionHandler)Decorators.DecorateCheckedSupplier<T>withRateLimiter(io.github.resilience4j.ratelimiter.RateLimiter rateLimiter)Decorators.DecorateCheckedSupplier<T>withRateLimiter(io.github.resilience4j.ratelimiter.RateLimiter rateLimiter, int permits)Decorators.DecorateCheckedSupplier<T>withRetry(io.github.resilience4j.retry.Retry retryContext)
-
-
-
Method Detail
-
withCircuitBreaker
public Decorators.DecorateCheckedSupplier<T> withCircuitBreaker(io.github.resilience4j.circuitbreaker.CircuitBreaker circuitBreaker)
-
withRetry
public Decorators.DecorateCheckedSupplier<T> withRetry(io.github.resilience4j.retry.Retry retryContext)
-
withRateLimiter
public Decorators.DecorateCheckedSupplier<T> withRateLimiter(io.github.resilience4j.ratelimiter.RateLimiter rateLimiter)
-
withRateLimiter
public Decorators.DecorateCheckedSupplier<T> withRateLimiter(io.github.resilience4j.ratelimiter.RateLimiter rateLimiter, int permits)
-
withCache
public <K> Decorators.DecorateCheckedFunction<K,T> withCache(io.github.resilience4j.cache.Cache<K,T> cache)
-
withBulkhead
public Decorators.DecorateCheckedSupplier<T> withBulkhead(io.github.resilience4j.bulkhead.Bulkhead bulkhead)
-
withFallback
public Decorators.DecorateCheckedSupplier<T> withFallback(io.vavr.CheckedFunction2<T,java.lang.Throwable,T> handler)
-
withFallback
public Decorators.DecorateCheckedSupplier<T> withFallback(java.util.function.Predicate<T> resultPredicate, io.vavr.CheckedFunction1<T,T> resultHandler)
-
withFallback
public Decorators.DecorateCheckedSupplier<T> withFallback(java.util.List<java.lang.Class<? extends java.lang.Throwable>> exceptionTypes, io.vavr.CheckedFunction1<java.lang.Throwable,T> exceptionHandler)
-
withFallback
public Decorators.DecorateCheckedSupplier<T> withFallback(io.vavr.CheckedFunction1<java.lang.Throwable,T> exceptionHandler)
-
withFallback
public <X extends java.lang.Throwable> Decorators.DecorateCheckedSupplier<T> withFallback(java.lang.Class<X> exceptionType, io.vavr.CheckedFunction1<java.lang.Throwable,T> exceptionHandler)
-
decorate
public io.vavr.CheckedFunction0<T> decorate()
-
get
public T get() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
-