public class InterceptorRetryPolicy extends Object implements org.springframework.retry.RetryPolicy
RetryPolicy
used by the LoadBalancerClient
when retrying failed
requests.Constructor and Description |
---|
InterceptorRetryPolicy(org.springframework.http.HttpRequest request,
LoadBalancedRetryPolicy policy,
ServiceInstanceChooser serviceInstanceChooser,
String serviceName)
Creates a new retry policy.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canRetry(org.springframework.retry.RetryContext context) |
void |
close(org.springframework.retry.RetryContext context) |
boolean |
equals(Object o) |
int |
hashCode() |
org.springframework.retry.RetryContext |
open(org.springframework.retry.RetryContext parent) |
void |
registerThrowable(org.springframework.retry.RetryContext context,
Throwable throwable) |
public InterceptorRetryPolicy(org.springframework.http.HttpRequest request, LoadBalancedRetryPolicy policy, ServiceInstanceChooser serviceInstanceChooser, String serviceName)
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.public boolean canRetry(org.springframework.retry.RetryContext context)
canRetry
in interface org.springframework.retry.RetryPolicy
public org.springframework.retry.RetryContext open(org.springframework.retry.RetryContext parent)
open
in interface org.springframework.retry.RetryPolicy
public void close(org.springframework.retry.RetryContext context)
close
in interface org.springframework.retry.RetryPolicy
public void registerThrowable(org.springframework.retry.RetryContext context, Throwable throwable)
registerThrowable
in interface org.springframework.retry.RetryPolicy
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.