public interface LoadBalancedRetryPolicy
LoadBalancerClient.| Modifier and Type | Method and Description |
|---|---|
boolean |
canRetryNextServer(LoadBalancedRetryContext context)
Return true to retry the failed request on the next server from the load balancer.
|
boolean |
canRetrySameServer(LoadBalancedRetryContext context)
Return true to retry the failed request on the same server.
|
void |
close(LoadBalancedRetryContext context)
Called when the retry operation has ended.
|
void |
registerThrowable(LoadBalancedRetryContext context,
Throwable throwable)
Called when the execution fails.
|
boolean |
retryableStatusCode(int statusCode)
If an exception is not thrown when making a request, this method will be called to see if the
client would like to retry the request based on the status code returned.
|
boolean canRetrySameServer(LoadBalancedRetryContext context)
context - The context for the retry operation.boolean canRetryNextServer(LoadBalancedRetryContext context)
context - The context for the retry operation.void close(LoadBalancedRetryContext context)
context - The context for the retry operation.void registerThrowable(LoadBalancedRetryContext context, Throwable throwable)
context - The context for the retry operation.throwable - The throwable from the failed execution.boolean retryableStatusCode(int statusCode)
404 when an app is not available. Since
HTTP clients do not throw an exception when a 404 is returned,
retryableStatusCode allows clients to force a retry.statusCode - The HTTP status code.Copyright © 2019 Pivotal Software, Inc.. All rights reserved.