Class Decorators.DecorateSupplier<T>
java.lang.Object
io.github.resilience4j.decorators.Decorators.DecorateSupplier<T>
- Enclosing interface:
- Decorators
public static class Decorators.DecorateSupplier<T>
extends java.lang.Object
-
Method Summary
Modifier and Type Method Description java.util.function.Supplier<T>decorate()Tget()Decorators.DecorateSupplier<T>withBulkhead(io.github.resilience4j.bulkhead.Bulkhead bulkhead)<K> Decorators.DecorateFunction<K,T>withCache(io.github.resilience4j.cache.Cache<K,T> cache)Decorators.DecorateSupplier<T>withCircuitBreaker(io.github.resilience4j.circuitbreaker.CircuitBreaker circuitBreaker)Decorators.DecorateSupplier<T>withFallback(java.util.function.BiFunction<T,java.lang.Throwable,T> handler)Decorators.DecorateSupplier<T>withFallback(java.util.function.Function<java.lang.Throwable,T> exceptionHandler)Decorators.DecorateSupplier<T>withFallback(java.util.function.Predicate<T> resultPredicate, java.util.function.UnaryOperator<T> resultHandler)Decorators.DecorateSupplier<T>withFallback(java.util.List<java.lang.Class<? extends java.lang.Throwable>> exceptionTypes, java.util.function.Function<java.lang.Throwable,T> exceptionHandler)Decorators.DecorateSupplier<T>withRateLimiter(io.github.resilience4j.ratelimiter.RateLimiter rateLimiter)Decorators.DecorateSupplier<T>withRateLimiter(io.github.resilience4j.ratelimiter.RateLimiter rateLimiter, int permits)Decorators.DecorateSupplier<T>withRetry(io.github.resilience4j.retry.Retry retryContext)Decorators.DecorateCompletionStage<T>withThreadPoolBulkhead(io.github.resilience4j.bulkhead.ThreadPoolBulkhead threadPoolBulkhead)
-
Method Details
-
withCircuitBreaker
public Decorators.DecorateSupplier<T> withCircuitBreaker(io.github.resilience4j.circuitbreaker.CircuitBreaker circuitBreaker) -
withRetry
-
withCache
public <K> Decorators.DecorateFunction<K,T> withCache(io.github.resilience4j.cache.Cache<K,T> cache) -
withRateLimiter
public Decorators.DecorateSupplier<T> withRateLimiter(io.github.resilience4j.ratelimiter.RateLimiter rateLimiter) -
withRateLimiter
public Decorators.DecorateSupplier<T> withRateLimiter(io.github.resilience4j.ratelimiter.RateLimiter rateLimiter, int permits) -
withBulkhead
public Decorators.DecorateSupplier<T> withBulkhead(io.github.resilience4j.bulkhead.Bulkhead bulkhead) -
withFallback
public Decorators.DecorateSupplier<T> withFallback(java.util.function.Function<java.lang.Throwable,T> exceptionHandler) -
withFallback
public Decorators.DecorateSupplier<T> withFallback(java.util.function.Predicate<T> resultPredicate, java.util.function.UnaryOperator<T> resultHandler) -
withFallback
public Decorators.DecorateSupplier<T> withFallback(java.util.function.BiFunction<T,java.lang.Throwable,T> handler) -
withFallback
public Decorators.DecorateSupplier<T> withFallback(java.util.List<java.lang.Class<? extends java.lang.Throwable>> exceptionTypes, java.util.function.Function<java.lang.Throwable,T> exceptionHandler) -
withThreadPoolBulkhead
public Decorators.DecorateCompletionStage<T> withThreadPoolBulkhead(io.github.resilience4j.bulkhead.ThreadPoolBulkhead threadPoolBulkhead) -
decorate
-
get
-