Class InterceptorRetryPolicy
- java.lang.Object
-
- org.springframework.cloud.client.loadbalancer.InterceptorRetryPolicy
-
- All Implemented Interfaces:
Serializable,org.springframework.retry.RetryPolicy
public class InterceptorRetryPolicy extends Object implements org.springframework.retry.RetryPolicy
RetryPolicyused by theLoadBalancerClientwhen retrying failed requests.- Author:
- Ryan Baxter, Olga Maciaszek-Sharma
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description InterceptorRetryPolicy(org.springframework.http.HttpRequest request, LoadBalancedRetryPolicy policy, ServiceInstanceChooser serviceInstanceChooser, String serviceName)Creates a new retry policy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanRetry(org.springframework.retry.RetryContext context)voidclose(org.springframework.retry.RetryContext context)booleanequals(Object o)inthashCode()org.springframework.retry.RetryContextopen(org.springframework.retry.RetryContext parent)voidregisterThrowable(org.springframework.retry.RetryContext context, Throwable throwable)
-
-
-
Constructor Detail
-
InterceptorRetryPolicy
public InterceptorRetryPolicy(org.springframework.http.HttpRequest request, LoadBalancedRetryPolicy policy, ServiceInstanceChooser serviceInstanceChooser, String serviceName)Creates a new retry policy.- Parameters:
request- The request that will be retried.policy- The retry policy from the load balancer.serviceInstanceChooser- The load balancer client.serviceName- The name of the service.
-
-
Method Detail
-
canRetry
public boolean canRetry(org.springframework.retry.RetryContext context)
- Specified by:
canRetryin interfaceorg.springframework.retry.RetryPolicy
-
open
public org.springframework.retry.RetryContext open(org.springframework.retry.RetryContext parent)
- Specified by:
openin interfaceorg.springframework.retry.RetryPolicy
-
close
public void close(org.springframework.retry.RetryContext context)
- Specified by:
closein interfaceorg.springframework.retry.RetryPolicy
-
registerThrowable
public void registerThrowable(org.springframework.retry.RetryContext context, Throwable throwable)- Specified by:
registerThrowablein interfaceorg.springframework.retry.RetryPolicy
-
-