Class RetryableExchangeFilterFunctionLoadBalancerRetryPolicy
- java.lang.Object
-
- org.springframework.cloud.client.loadbalancer.reactive.RetryableExchangeFilterFunctionLoadBalancerRetryPolicy
-
- All Implemented Interfaces:
LoadBalancerRetryPolicy
public class RetryableExchangeFilterFunctionLoadBalancerRetryPolicy extends Object implements LoadBalancerRetryPolicy
The default implementation ofLoadBalancerRetryPolicy.- Since:
- 3.0.0
- Author:
- Olga Maciaszek-Sharma
-
-
Constructor Summary
Constructors Constructor Description RetryableExchangeFilterFunctionLoadBalancerRetryPolicy(LoadBalancerProperties properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanRetryNextServiceInstance(LoadBalancerRetryContext context)Returntrueto retry on the next service instance.booleancanRetryOnMethod(org.springframework.http.HttpMethod method)Returntrueto retry on the provided HTTP method.booleancanRetrySameServiceInstance(LoadBalancerRetryContext context)Returntrueto retry on the same service instance.booleanretryableStatusCode(int statusCode)Returntrueto retry on the provided HTTP status code.
-
-
-
Constructor Detail
-
RetryableExchangeFilterFunctionLoadBalancerRetryPolicy
public RetryableExchangeFilterFunctionLoadBalancerRetryPolicy(LoadBalancerProperties properties)
-
-
Method Detail
-
canRetrySameServiceInstance
public boolean canRetrySameServiceInstance(LoadBalancerRetryContext context)
Description copied from interface:LoadBalancerRetryPolicyReturntrueto retry on the same service instance.- Specified by:
canRetrySameServiceInstancein interfaceLoadBalancerRetryPolicy- Parameters:
context- the context for the retry operation- Returns:
- true to retry on the same service instance
-
canRetryNextServiceInstance
public boolean canRetryNextServiceInstance(LoadBalancerRetryContext context)
Description copied from interface:LoadBalancerRetryPolicyReturntrueto retry on the next service instance.- Specified by:
canRetryNextServiceInstancein interfaceLoadBalancerRetryPolicy- Parameters:
context- the context for the retry operation- Returns:
- true to retry on the same service instance
-
retryableStatusCode
public boolean retryableStatusCode(int statusCode)
Description copied from interface:LoadBalancerRetryPolicyReturntrueto retry on the provided HTTP status code.- Specified by:
retryableStatusCodein interfaceLoadBalancerRetryPolicy- Parameters:
statusCode- the HTTP status code- Returns:
- true to retry on the provided HTTP status code
-
canRetryOnMethod
public boolean canRetryOnMethod(org.springframework.http.HttpMethod method)
Description copied from interface:LoadBalancerRetryPolicyReturntrueto retry on the provided HTTP method.- Specified by:
canRetryOnMethodin interfaceLoadBalancerRetryPolicy- Parameters:
method- the HTTP request method- Returns:
- true to retry on the provided HTTP method
-
-