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 of
LoadBalancerRetryPolicy.- Since:
- 3.0.0
- Author:
- Olga Maciaszek-Sharma
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturntrueto retry on the next service instance.booleancanRetryOnMethod(org.springframework.http.HttpMethod method) Returntrueto retry on the provided HTTP method.booleanReturntrueto retry on the same service instance.booleanretryableException(Throwable throwable) Returntrueto retry if the provided exception is thrown.booleanretryableStatusCode(int statusCode) Returntrueto retry on the provided HTTP status code.
-
Constructor Details
-
RetryableExchangeFilterFunctionLoadBalancerRetryPolicy
-
-
Method Details
-
canRetrySameServiceInstance
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
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
-
retryableException
Description copied from interface:LoadBalancerRetryPolicyReturntrueto retry if the provided exception is thrown.- Specified by:
retryableExceptionin interfaceLoadBalancerRetryPolicy- Parameters:
throwable- theThrowableto evaluate- Returns:
- true to retry on the provided exception
-
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
-