public abstract class AbstractLoadBalancerAwareClient<S extends com.netflix.client.ClientRequest,T extends com.netflix.client.IResponse> extends LoadBalancerExecutor implements com.netflix.client.IClient<S,T>, com.netflix.client.IClientConfigAware
clientName, defaultRetryHandler, maxAutoRetries, maxAutoRetriesNextServer, okToRetryOnAllOperations, vipAddresses
Constructor and Description |
---|
AbstractLoadBalancerAwareClient(ILoadBalancer lb) |
AbstractLoadBalancerAwareClient(ILoadBalancer lb,
com.netflix.client.config.IClientConfig clientConfig)
|
Modifier and Type | Method and Description |
---|---|
protected T |
executeOnSingleServer(S request,
com.netflix.client.config.IClientConfig requestConfig)
Execute the request on single server after the final URI is calculated.
|
T |
executeWithLoadBalancer(S request) |
T |
executeWithLoadBalancer(S request,
com.netflix.client.config.IClientConfig requestConfig)
This method should be used when the caller wants to dispatch the request to a server chosen by
the load balancer, instead of specifying the server in the request's URI.
|
abstract com.netflix.client.RequestSpecificRetryHandler |
getRequestSpecificRetryHandler(S request,
com.netflix.client.config.IClientConfig requestConfig) |
protected boolean |
isCircuitBreakerException(java.lang.Throwable e)
Deprecated.
|
protected boolean |
isRetriable(S request)
Deprecated.
|
protected boolean |
isRetriableException(java.lang.Throwable e)
Deprecated.
|
create, create, create, create, execute, execute, retryWithSameServer
deriveHostAndPortFromVipAddress, deriveSchemeAndPortFromPartialUri, generateNIWSException, getClientName, getDeepestCause, getDefaultPortFromScheme, getExecuteTracer, getLoadBalancer, getMaxAutoRetries, getMaxAutoRetriesNextServer, getNumberRetriesOnSameServer, getRetriesNextServer, getRetryHandler, getServerFromLoadBalancer, getServerStats, handleSameServerRetry, initWithNiwsConfig, isOkToRetryOnAllOperations, noteError, noteOpenConnection, noteRequestCompletion, noteRequestCompletion, noteResponse, reconstructURIWithServer, setLoadBalancer, setMaxAutoRetries, setMaxAutoRetriesNextServer, setOkToRetryOnAllOperations, setRetryHandler
public AbstractLoadBalancerAwareClient(ILoadBalancer lb)
public AbstractLoadBalancerAwareClient(ILoadBalancer lb, com.netflix.client.config.IClientConfig clientConfig)
clientConfig
- @Deprecated protected boolean isCircuitBreakerException(java.lang.Throwable e)
AvailabilityFilteringRule
, which is the default rule for load balancers.@Deprecated protected boolean isRetriableException(java.lang.Throwable e)
protected T executeOnSingleServer(S request, com.netflix.client.config.IClientConfig requestConfig) throws com.netflix.client.ClientException
com.netflix.client.ClientException
public T executeWithLoadBalancer(S request) throws com.netflix.client.ClientException
com.netflix.client.ClientException
public T executeWithLoadBalancer(S request, com.netflix.client.config.IClientConfig requestConfig) throws com.netflix.client.ClientException
LoadBalancerContext.reconstructURIWithServer(com.netflix.loadbalancer.Server, java.net.URI)
and then calls executeWithLoadBalancer(ClientRequest, com.netflix.client.config.IClientConfig)
.request
- request to be dispatched to a server chosen by the load balancer. The URI can be a partial
URI which does not contain the host name or the protocol.com.netflix.client.ClientException
public abstract com.netflix.client.RequestSpecificRetryHandler getRequestSpecificRetryHandler(S request, com.netflix.client.config.IClientConfig requestConfig)
@Deprecated protected boolean isRetriable(S request)