Class BulkheadTransformer<T>
java.lang.Object
io.github.resilience4j.ratpack.internal.AbstractTransformer<T>
io.github.resilience4j.ratpack.bulkhead.BulkheadTransformer<T>
- All Implemented Interfaces:
ratpack.func.Function<ratpack.exec.Upstream<? extends T>,ratpack.exec.Upstream<T>>
public class BulkheadTransformer<T> extends AbstractTransformer<T>
-
Nested Class Summary
-
Field Summary
-
Method Summary
Modifier and Type Method Description ratpack.exec.Upstream<T>apply(ratpack.exec.Upstream<? extends T> upstream)static <T> BulkheadTransformer<T>of(io.github.resilience4j.bulkhead.Bulkhead bulkhead)Create a new transformer that can be applied to thePromise.transform(Function)method.BulkheadTransformer<T>recover(ratpack.func.Function<java.lang.Throwable,? extends T> recoverer)Set a recovery function that will execute when the rateLimiter limit is exceeded.Methods inherited from class io.github.resilience4j.ratpack.internal.AbstractTransformer
handleRecovery
-
Method Details
-
of
Create a new transformer that can be applied to thePromise.transform(Function)method. The Promised value will pass through the bulkhead, potentially causing it to throw error on reaching limit of concurrent calls.- Type Parameters:
T- the type of object- Parameters:
bulkhead- the bulkhead to use- Returns:
- the transformer
-
recover
public BulkheadTransformer<T> recover(ratpack.func.Function<java.lang.Throwable,? extends T> recoverer)Set a recovery function that will execute when the rateLimiter limit is exceeded.- Parameters:
recoverer- the recovery function- Returns:
- the transformer
-
apply
public ratpack.exec.Upstream<T> apply(ratpack.exec.Upstream<? extends T> upstream) throws java.lang.Exception- Throws:
java.lang.Exception
-