public static class Decorators.DecorateCompletionStage<T>
extends java.lang.Object
| Constructor and Description |
|---|
DecorateCompletionStage(java.util.function.Supplier<java.util.concurrent.CompletionStage<T>> stageSupplier) |
| Modifier and Type | Method and Description |
|---|---|
java.util.function.Supplier<java.util.concurrent.CompletionStage<T>> |
decorate() |
java.util.concurrent.CompletionStage<T> |
get() |
Decorators.DecorateCompletionStage<T> |
withBulkhead(io.github.resilience4j.bulkhead.Bulkhead bulkhead) |
Decorators.DecorateCompletionStage<T> |
withCircuitBreaker(io.github.resilience4j.circuitbreaker.CircuitBreaker circuitBreaker) |
Decorators.DecorateCompletionStage<T> |
withFallback(java.util.function.BiFunction<T,java.lang.Throwable,T> handler) |
<X extends java.lang.Throwable> |
withFallback(java.lang.Class<X> exceptionType,
java.util.function.Function<java.lang.Throwable,T> exceptionHandler) |
Decorators.DecorateCompletionStage<T> |
withFallback(java.util.function.Function<java.lang.Throwable,T> exceptionHandler) |
Decorators.DecorateCompletionStage<T> |
withFallback(java.util.List<java.lang.Class<? extends java.lang.Throwable>> exceptionTypes,
java.util.function.Function<java.lang.Throwable,T> exceptionHandler) |
Decorators.DecorateCompletionStage<T> |
withFallback(java.util.function.Predicate<T> resultPredicate,
java.util.function.UnaryOperator<T> resultHandler) |
Decorators.DecorateCompletionStage<T> |
withRateLimiter(io.github.resilience4j.ratelimiter.RateLimiter rateLimiter) |
Decorators.DecorateCompletionStage<T> |
withRateLimiter(io.github.resilience4j.ratelimiter.RateLimiter rateLimiter,
int permits) |
Decorators.DecorateCompletionStage<T> |
withRetry(io.github.resilience4j.retry.Retry retryContext,
java.util.concurrent.ScheduledExecutorService scheduler) |
Decorators.DecorateCompletionStage<T> |
withTimeLimiter(io.github.resilience4j.timelimiter.TimeLimiter timeLimiter,
java.util.concurrent.ScheduledExecutorService scheduler) |
public DecorateCompletionStage(java.util.function.Supplier<java.util.concurrent.CompletionStage<T>> stageSupplier)
public Decorators.DecorateCompletionStage<T> withCircuitBreaker(io.github.resilience4j.circuitbreaker.CircuitBreaker circuitBreaker)
public Decorators.DecorateCompletionStage<T> withRetry(io.github.resilience4j.retry.Retry retryContext, java.util.concurrent.ScheduledExecutorService scheduler)
public Decorators.DecorateCompletionStage<T> withBulkhead(io.github.resilience4j.bulkhead.Bulkhead bulkhead)
public Decorators.DecorateCompletionStage<T> withTimeLimiter(io.github.resilience4j.timelimiter.TimeLimiter timeLimiter, java.util.concurrent.ScheduledExecutorService scheduler)
public Decorators.DecorateCompletionStage<T> withRateLimiter(io.github.resilience4j.ratelimiter.RateLimiter rateLimiter)
public Decorators.DecorateCompletionStage<T> withRateLimiter(io.github.resilience4j.ratelimiter.RateLimiter rateLimiter, int permits)
public Decorators.DecorateCompletionStage<T> withFallback(java.util.function.Predicate<T> resultPredicate, java.util.function.UnaryOperator<T> resultHandler)
public Decorators.DecorateCompletionStage<T> withFallback(java.util.function.BiFunction<T,java.lang.Throwable,T> handler)
public Decorators.DecorateCompletionStage<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> withFallback(java.util.function.Function<java.lang.Throwable,T> exceptionHandler)
public <X extends java.lang.Throwable> Decorators.DecorateCompletionStage<T> withFallback(java.lang.Class<X> exceptionType, java.util.function.Function<java.lang.Throwable,T> exceptionHandler)
public java.util.function.Supplier<java.util.concurrent.CompletionStage<T>> decorate()
public java.util.concurrent.CompletionStage<T> get()