public interface RetrofitCircuitBreaker
Call to inform a CircuitBreaker when an exception is thrown.
All exceptions are marked as errors or responses not matching the supplied predicate. For
example:
RetrofitCircuitBreaker.decorateCall(circuitBreaker, call, Response::isSuccessful);
| Modifier and Type | Interface and Description |
|---|---|
static class |
RetrofitCircuitBreaker.CircuitBreakingCall<T> |
| Modifier and Type | Method and Description |
|---|---|
static <T> retrofit2.Call<T> |
decorateCall(io.github.resilience4j.circuitbreaker.CircuitBreaker circuitBreaker,
retrofit2.Call<T> call,
java.util.function.Predicate<retrofit2.Response> responseSuccess)
Decorate
Calls allow CircuitBreaker functionality. |
static <T> retrofit2.Call<T> decorateCall(io.github.resilience4j.circuitbreaker.CircuitBreaker circuitBreaker,
retrofit2.Call<T> call,
java.util.function.Predicate<retrofit2.Response> responseSuccess)
Calls allow CircuitBreaker functionality.T - Response type of callcircuitBreaker - CircuitBreaker to applycall - Call to decorateresponseSuccess - determines whether the response should be considered an expected
response