Class CircuitBreakerRpcClientBuilder
java.lang.Object
com.linecorp.armeria.client.circuitbreaker.AbstractCircuitBreakerClientBuilder<RpcRequest,RpcResponse>
com.linecorp.armeria.client.circuitbreaker.CircuitBreakerRpcClientBuilder
public final class CircuitBreakerRpcClientBuilder
extends AbstractCircuitBreakerClientBuilder<RpcRequest,RpcResponse>
Builds a new
CircuitBreakerRpcClient
or its decorator function.-
Method Summary
Modifier and TypeMethodDescriptionReturns a newly-createdCircuitBreakerRpcClient
based on the properties of this builder.handler
(CircuitBreakerClientHandler handler) Sets theCircuitBreakerClientHandler
.mapping
(CircuitBreakerMapping mapping) Sets theCircuitBreakerMapping
.Function<? super RpcClient,
CircuitBreakerRpcClient> Returns a newly-created decorator that decorates anRpcClient
with a newCircuitBreakerRpcClient
based on the properties of this builder.Methods inherited from class com.linecorp.armeria.client.circuitbreaker.AbstractCircuitBreakerClientBuilder
toString
-
Method Details
-
build
Returns a newly-createdCircuitBreakerRpcClient
based on the properties of this builder. -
newDecorator
Returns a newly-created decorator that decorates anRpcClient
with a newCircuitBreakerRpcClient
based on the properties of this builder. -
mapping
Description copied from class:AbstractCircuitBreakerClientBuilder
Sets theCircuitBreakerMapping
. If unspecified,CircuitBreakerMapping.ofDefault()
will be used. Note that theCircuitBreakerClientHandler
set by callingAbstractCircuitBreakerClientBuilder.handler(CircuitBreakerClientHandler)
will be overwritten by calling this method.- Overrides:
mapping
in classAbstractCircuitBreakerClientBuilder<RpcRequest,
RpcResponse> - Returns:
this
to support method chaining.
-
handler
Description copied from class:AbstractCircuitBreakerClientBuilder
Sets theCircuitBreakerClientHandler
. Note that theCircuitBreakerMapping
set by callingAbstractCircuitBreakerClientBuilder.mapping(CircuitBreakerMapping)
will be overwritten by calling this method.- Overrides:
handler
in classAbstractCircuitBreakerClientBuilder<RpcRequest,
RpcResponse> - Returns:
this
to support method chaining.
-