Class InterceptorRetryPolicy
java.lang.Object
org.springframework.cloud.client.loadbalancer.InterceptorRetryPolicy
- All Implemented Interfaces:
Serializable
,org.springframework.retry.RetryPolicy
RetryPolicy
used by the LoadBalancerClient
when retrying failed
requests.- Author:
- Ryan Baxter, Olga Maciaszek-Sharma
- See Also:
-
Constructor Summary
ConstructorDescriptionInterceptorRetryPolicy
(org.springframework.http.HttpRequest request, LoadBalancedRetryPolicy policy, ServiceInstanceChooser serviceInstanceChooser, String serviceName) Creates a new retry policy. -
Method Summary
Modifier and TypeMethodDescriptionboolean
canRetry
(org.springframework.retry.RetryContext context) void
close
(org.springframework.retry.RetryContext context) boolean
int
hashCode()
org.springframework.retry.RetryContext
open
(org.springframework.retry.RetryContext parent) void
registerThrowable
(org.springframework.retry.RetryContext context, Throwable throwable)
-
Constructor Details
-
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 Details
-
canRetry
public boolean canRetry(org.springframework.retry.RetryContext context) - Specified by:
canRetry
in interfaceorg.springframework.retry.RetryPolicy
-
open
public org.springframework.retry.RetryContext open(org.springframework.retry.RetryContext parent) - Specified by:
open
in interfaceorg.springframework.retry.RetryPolicy
-
close
public void close(org.springframework.retry.RetryContext context) - Specified by:
close
in interfaceorg.springframework.retry.RetryPolicy
-
registerThrowable
- Specified by:
registerThrowable
in interfaceorg.springframework.retry.RetryPolicy
-
equals
-
hashCode
public int hashCode()
-