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