Interface LoadBalancerRetryPolicy
-
- All Known Implementing Classes:
RetryableExchangeFilterFunctionLoadBalancerRetryPolicy
public interface LoadBalancerRetryPolicyPluggable policy used to establish whether a given load-balanced call should be retried.- Since:
- 3.0.0
- Author:
- Olga Maciaszek-Sharma
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceLoadBalancerRetryPolicy.Factory
-
Method Summary
All Methods Instance Methods Abstract 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.
-
-
-
Method Detail
-
canRetrySameServiceInstance
boolean canRetrySameServiceInstance(LoadBalancerRetryContext context)
Returntrueto retry on the same service instance.- Parameters:
context- the context for the retry operation- Returns:
- true to retry on the same service instance
-
canRetryNextServiceInstance
boolean canRetryNextServiceInstance(LoadBalancerRetryContext context)
Returntrueto retry on the next service instance.- Parameters:
context- the context for the retry operation- Returns:
- true to retry on the same service instance
-
retryableStatusCode
boolean retryableStatusCode(int statusCode)
Returntrueto retry on the provided HTTP status code.- Parameters:
statusCode- the HTTP status code- Returns:
- true to retry on the provided HTTP status code
-
canRetryOnMethod
boolean canRetryOnMethod(org.springframework.http.HttpMethod method)
Returntrueto retry on the provided HTTP method.- Parameters:
method- the HTTP request method- Returns:
- true to retry on the provided HTTP method
-
-