Interface Resilience4jCircuitBreakerFactory
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A functional interface that represents a mapper factory, mapping a combination of host, method and path
to a
CircuitBreaker using a CircuitBreakerRegistry.-
Method Summary
Modifier and TypeMethodDescriptionio.github.resilience4j.circuitbreaker.CircuitBreakerapply(io.github.resilience4j.circuitbreaker.CircuitBreakerRegistry registry, @Nullable String host, @Nullable String method, @Nullable String path) Given a combination of registry, host, method and path, creates aCircuitBreaker.of()Returns the defaultResilience4jCircuitBreakerFactory.
-
Method Details
-
of
Returns the defaultResilience4jCircuitBreakerFactory. The host, method, and path will be concatenated with a '#' and will be used as the name parameter ofCircuitBreakerRegistry.circuitBreaker(String). -
apply
io.github.resilience4j.circuitbreaker.CircuitBreaker apply(io.github.resilience4j.circuitbreaker.CircuitBreakerRegistry registry, @Nullable @Nullable String host, @Nullable @Nullable String method, @Nullable @Nullable String path) Given a combination of registry, host, method and path, creates aCircuitBreaker.- Parameters:
registry- the registry used by theCircuitBreakerClientHandler.host- the host of the context endpoint.method- the method of the context request.path- the path of the context request.- Returns:
- the
CircuitBreakerinstance corresponding to this combination.
-