@Test public void getRequestSpecificRetryHandler() throws Exception { TcpRequest request = new TcpRequest.Builder(new URI("http: AsyncLoadBalancingTcpClient client = new AsyncLoadBalancingTcpClient(); RequestSpecificRetryHandler handler = client.getRequestSpecificRetryHandler(request, null); assertTrue(handler.isRetriableException(new SocketException(), false)); request = new TcpRequest.Builder(new URI("http: handler = client.getRequestSpecificRetryHandler(request, null); assertFalse(handler.isRetriableException(new SocketException(), false)); }
@Override public RequestSpecificRetryHandler getRequestSpecificRetryHandler(TcpRequest request, IClientConfig requestConfig) { if (!request.isRetriable()) { return new RequestSpecificRetryHandler(false, false, this.getRetryHandler(), requestConfig); } if (this.icc != null && this.icc.get(CommonClientConfigKey.OkToRetryOnAllOperations, false)) { return new RequestSpecificRetryHandler(true, true, this.getRetryHandler(), requestConfig); } else { return new RequestSpecificRetryHandler(request.isRetriable(), false, this.getRetryHandler(), requestConfig); } }
AsyncLoadBalancingTcpClient extends AbstractLoadBalancerAwareClient<TcpRequest, AsyncTcpResponse> { @Override public RequestSpecificRetryHandler getRequestSpecificRetryHandler(TcpRequest request, IClientConfig requestConfig) { if (!request.isRetriable()) { return new RequestSpecificRetryHandler(false, false, this.getRetryHandler(), requestConfig); } if (this.icc != null && this.icc.get(CommonClientConfigKey.OkToRetryOnAllOperations, false)) { return new RequestSpecificRetryHandler(true, true, this.getRetryHandler(), requestConfig); } else { return new RequestSpecificRetryHandler(request.isRetriable(), false, this.getRetryHandler(), requestConfig); } } }
AsyncLoadBalancingTcpClient extends AbstractLoadBalancerAwareClient<TcpRequest, AsyncTcpResponse> { @Override public RequestSpecificRetryHandler getRequestSpecificRetryHandler(TcpRequest request, IClientConfig requestConfig) { if (!request.isRetriable()) { return new RequestSpecificRetryHandler(false, false, this.getRetryHandler(), requestConfig); } if (this.icc != null && this.icc.get(CommonClientConfigKey.OkToRetryOnAllOperations, false)) { return new RequestSpecificRetryHandler(true, true, this.getRetryHandler(), requestConfig); } else { return new RequestSpecificRetryHandler(request.isRetriable(), false, this.getRetryHandler(), requestConfig); } } AsyncLoadBalancingTcpClient();  AsyncLoadBalancingTcpClient(ILoadBalancer lb);  AsyncLoadBalancingTcpClient(ILoadBalancer lb, IClientConfig clientConfig, ConnectionPoolManager poolManager);  AsyncLoadBalancingTcpClient(ILoadBalancer lb, IClientConfig clientConfig, Initializer initializer);  AsyncLoadBalancingTcpClient(ILoadBalancer lb, IClientConfig clientConfig, Bootstrap bootstrap); }
AsyncLoadBalancingTcpClient extends AbstractLoadBalancerAwareClient<TcpRequest, AsyncTcpResponse> { @Override public RequestSpecificRetryHandler getRequestSpecificRetryHandler(TcpRequest request, IClientConfig requestConfig) { if (!request.isRetriable()) { return new RequestSpecificRetryHandler(false, false, this.getRetryHandler(), requestConfig); } if (this.icc != null && this.icc.get(CommonClientConfigKey.OkToRetryOnAllOperations, false)) { return new RequestSpecificRetryHandler(true, true, this.getRetryHandler(), requestConfig); } else { return new RequestSpecificRetryHandler(request.isRetriable(), false, this.getRetryHandler(), requestConfig); } } AsyncLoadBalancingTcpClient();  AsyncLoadBalancingTcpClient(ILoadBalancer lb);  AsyncLoadBalancingTcpClient(ILoadBalancer lb, IClientConfig clientConfig, ConnectionPoolManager poolManager);  AsyncLoadBalancingTcpClient(ILoadBalancer lb, IClientConfig clientConfig, Initializer initializer);  AsyncLoadBalancingTcpClient(ILoadBalancer lb, IClientConfig clientConfig, Bootstrap bootstrap); void shutdown(); @Override RequestSpecificRetryHandler getRequestSpecificRetryHandler(TcpRequest request, IClientConfig requestConfig); @Override AsyncTcpResponse execute(TcpRequest request, IClientConfig requestConfig); }
AsyncLoadBalancingTcpClient extends AbstractLoadBalancerAwareClient<TcpRequest, AsyncTcpResponse> { @Override public RequestSpecificRetryHandler getRequestSpecificRetryHandler(TcpRequest request, IClientConfig requestConfig) { if (!request.isRetriable()) { return new RequestSpecificRetryHandler(false, false, this.getRetryHandler(), requestConfig); } if (this.icc != null && this.icc.get(CommonClientConfigKey.OkToRetryOnAllOperations, false)) { return new RequestSpecificRetryHandler(true, true, this.getRetryHandler(), requestConfig); } else { return new RequestSpecificRetryHandler(request.isRetriable(), false, this.getRetryHandler(), requestConfig); } } AsyncLoadBalancingTcpClient();  AsyncLoadBalancingTcpClient(ILoadBalancer lb);  AsyncLoadBalancingTcpClient(ILoadBalancer lb, IClientConfig clientConfig, ConnectionPoolManager poolManager);  AsyncLoadBalancingTcpClient(ILoadBalancer lb, IClientConfig clientConfig, Initializer initializer);  AsyncLoadBalancingTcpClient(ILoadBalancer lb, IClientConfig clientConfig, Bootstrap bootstrap); void shutdown(); @Override RequestSpecificRetryHandler getRequestSpecificRetryHandler(TcpRequest request, IClientConfig requestConfig); @Override AsyncTcpResponse execute(TcpRequest request, IClientConfig requestConfig);  }