Class RetryableLoadBalancerExchangeFilterFunction
java.lang.Object
org.springframework.cloud.client.loadbalancer.reactive.RetryableLoadBalancerExchangeFilterFunction
- All Implemented Interfaces:
LoadBalancedExchangeFilterFunction
,org.springframework.web.reactive.function.client.ExchangeFilterFunction
public class RetryableLoadBalancerExchangeFilterFunction
extends Object
implements LoadBalancedExchangeFilterFunction
An
ExchangeFilterFunction
that uses ReactiveLoadBalancer
to execute
requests against a correct ServiceInstance
and Reactor Retries to retry the
call both against the same and the next service instance, based on the provided
LoadBalancerRetryPolicy
.- Since:
- 3.0.0
- Author:
- Olga Maciaszek-Sharma
-
Constructor Summary
ConstructorDescriptionRetryableLoadBalancerExchangeFilterFunction
(LoadBalancerRetryPolicy.Factory retryPolicyFactory, ReactiveLoadBalancer.Factory<ServiceInstance> loadBalancerFactory, List<LoadBalancerClientRequestTransformer> transformers) RetryableLoadBalancerExchangeFilterFunction
(LoadBalancerRetryPolicy retryPolicy, ReactiveLoadBalancer.Factory<ServiceInstance> loadBalancerFactory, LoadBalancerProperties properties) Deprecated.RetryableLoadBalancerExchangeFilterFunction
(LoadBalancerRetryPolicy retryPolicy, ReactiveLoadBalancer.Factory<ServiceInstance> loadBalancerFactory, LoadBalancerProperties properties, List<LoadBalancerClientRequestTransformer> transformers) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionprotected reactor.core.publisher.Mono<Response<ServiceInstance>>
choose
(String serviceId, Request<RetryableRequestContext> request) reactor.core.publisher.Mono<org.springframework.web.reactive.function.client.ClientResponse>
filter
(org.springframework.web.reactive.function.client.ClientRequest clientRequest, org.springframework.web.reactive.function.client.ExchangeFunction next) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.web.reactive.function.client.ExchangeFilterFunction
andThen, apply
-
Constructor Details
-
RetryableLoadBalancerExchangeFilterFunction
@Deprecated public RetryableLoadBalancerExchangeFilterFunction(LoadBalancerRetryPolicy retryPolicy, ReactiveLoadBalancer.Factory<ServiceInstance> loadBalancerFactory, LoadBalancerProperties properties) Deprecated. -
RetryableLoadBalancerExchangeFilterFunction
@Deprecated public RetryableLoadBalancerExchangeFilterFunction(LoadBalancerRetryPolicy retryPolicy, ReactiveLoadBalancer.Factory<ServiceInstance> loadBalancerFactory, LoadBalancerProperties properties, List<LoadBalancerClientRequestTransformer> transformers) Deprecated. -
RetryableLoadBalancerExchangeFilterFunction
public RetryableLoadBalancerExchangeFilterFunction(LoadBalancerRetryPolicy.Factory retryPolicyFactory, ReactiveLoadBalancer.Factory<ServiceInstance> loadBalancerFactory, List<LoadBalancerClientRequestTransformer> transformers)
-
-
Method Details
-
filter
public reactor.core.publisher.Mono<org.springframework.web.reactive.function.client.ClientResponse> filter(org.springframework.web.reactive.function.client.ClientRequest clientRequest, org.springframework.web.reactive.function.client.ExchangeFunction next) - Specified by:
filter
in interfaceorg.springframework.web.reactive.function.client.ExchangeFilterFunction
-
choose
protected reactor.core.publisher.Mono<Response<ServiceInstance>> choose(String serviceId, Request<RetryableRequestContext> request)
-
RetryableLoadBalancerExchangeFilterFunction(LoadBalancerRetryPolicy, ReactiveLoadBalancer.Factory, LoadBalancerProperties, List)
.