Interface Resilience4jCircuitBreakerMapping
- All Superinterfaces:
com.linecorp.armeria.client.circuitbreaker.ClientCircuitBreakerGenerator<io.github.resilience4j.circuitbreaker.CircuitBreaker>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@UnstableApi
@FunctionalInterface
public interface Resilience4jCircuitBreakerMapping
extends com.linecorp.armeria.client.circuitbreaker.ClientCircuitBreakerGenerator<io.github.resilience4j.circuitbreaker.CircuitBreaker>
Returns a
CircuitBreaker instance from remote invocation parameters.-
Method Summary
Modifier and TypeMethodDescriptionbuilder()Returns a builder that builds aResilience4jCircuitBreakerMappingby setting host, method and/or path.io.github.resilience4j.circuitbreaker.CircuitBreakerget(com.linecorp.armeria.client.ClientRequestContext ctx, com.linecorp.armeria.common.Request req) Returns theCircuitBreakermapped to the given parameters.of()Returns the defaultResilience4jCircuitBreakerMapping.perHost()Creates a newResilience4jCircuitBreakerMappingwhich mapsCircuitBreakers with the remote host name.Creates a newResilience4jCircuitBreakerMappingwhich mapsCircuitBreakers with the remote host and method name.Creates a newResilience4jCircuitBreakerMappingwhich mapsCircuitBreakers with method name.perPath()Creates a newResilience4jCircuitBreakerMappingwhich mapsCircuitBreakers with the request path.
-
Method Details
-
of
Returns the defaultResilience4jCircuitBreakerMapping. ACircuitBreakerwill be created per host using aCircuitBreakerRegistrywith default configurations. -
builder
Returns a builder that builds aResilience4jCircuitBreakerMappingby setting host, method and/or path. -
perMethod
Creates a newResilience4jCircuitBreakerMappingwhich mapsCircuitBreakers with method name. -
perHost
Creates a newResilience4jCircuitBreakerMappingwhich mapsCircuitBreakers with the remote host name. -
perPath
Creates a newResilience4jCircuitBreakerMappingwhich mapsCircuitBreakers with the request path. -
perHostAndMethod
Creates a newResilience4jCircuitBreakerMappingwhich mapsCircuitBreakers with the remote host and method name. -
get
io.github.resilience4j.circuitbreaker.CircuitBreaker get(com.linecorp.armeria.client.ClientRequestContext ctx, com.linecorp.armeria.common.Request req) Returns theCircuitBreakermapped to the given parameters.- Specified by:
getin interfacecom.linecorp.armeria.client.circuitbreaker.ClientCircuitBreakerGenerator<io.github.resilience4j.circuitbreaker.CircuitBreaker>
-