private void onFutureFailure(Channel channel, Throwable cause) { abortChannelPreemption(); boolean canRetry = future.canRetry(); LOGGER.debug("Trying to recover from failing to connect channel {} with a retry value of {} ", channel, canRetry); if (canRetry// && cause != null// && (future.getState() != NettyResponseFuture.STATE.NEW || StackTraceInspector.recoverOnNettyDisconnectException(cause))) { if (requestSender.retry(future)) { return; } } LOGGER.debug("Failed to recover from connect exception: {} with channel {}", cause, channel); boolean printCause = cause != null && cause.getMessage() != null; String printedCause = printCause ? cause.getMessage() : getBaseUrl(future.getUri()); ConnectException e = new ConnectException(printedCause); if (cause != null) e.initCause(cause); future.abort(e); }
private void onFutureFailure(Channel channel, Throwable cause) { abortChannelPreemption(); boolean canRetry = future.canRetry(); LOGGER.debug("Trying to recover from failing to connect channel {} with a retry value of {} ", channel, canRetry); if (canRetry && cause != null && (future.getState() != NettyResponseFuture.STATE.NEW || StackTraceInspector.recoverOnNettyDisconnectException(cause))) { if (requestSender.retry(future)) return; } LOGGER.debug("Failed to recover from connect exception: {} with channel {}", cause, channel); boolean printCause = cause != null && cause.getMessage() != null; String printedCause = printCause ? cause.getMessage() : getBaseUrl(future.getUri()); ConnectException e = new ConnectException(printedCause); if (cause != null) { e.initCause(cause); } future.abort(e); }
private void onFutureFailure(Channel channel, Throwable cause) { abortChannelPreemption(); boolean canRetry = future.canRetry(); LOGGER.debug("Trying to recover from failing to connect channel {} with a retry value of {} ", channel, canRetry); if (canRetry && cause != null && (future.getState() != NettyResponseFuture.STATE.NEW || StackTraceInspector.recoverOnNettyDisconnectException(cause))) { if (requestSender.retry(future)) return; } LOGGER.debug("Failed to recover from connect exception: {} with channel {}", cause, channel); boolean printCause = cause != null && cause.getMessage() != null; String printedCause = printCause ? cause.getMessage() : getBaseUrl(future.getUri()); ConnectException e = new ConnectException(printedCause); if (cause != null) { e.initCause(cause); } future.abort(e); }
private void onFutureFailure(Channel channel, Throwable cause) { abortChannelPreemption(); boolean canRetry = future.canRetry(); LOGGER.debug("Trying to recover from failing to connect channel {} with a retry value of {} ", channel, canRetry); if (canRetry// && cause != null// && (future.getState() != NettyResponseFuture.STATE.NEW || StackTraceInspector.recoverOnNettyDisconnectException(cause))) { if (requestSender.retry(future)) { return; } } LOGGER.debug("Failed to recover from connect exception: {} with channel {}", cause, channel); boolean printCause = cause != null && cause.getMessage() != null; String printedCause = printCause ? cause.getMessage() : getBaseUrl(future.getUri()); ConnectException e = new ConnectException(printedCause); if (cause != null) e.initCause(cause); future.abort(e); }
public Object getPartitionKey(Uri uri, String virtualHost, ProxyServer proxyServer) { String targetHostBaseUrl = virtualHost != null ? virtualHost : AsyncHttpProviderUtils.getBaseUrl(uri); if (proxyServer != null) { return uri.isSecured() ? // new ProxyPartitionKey(proxyServer.getHost(), proxyServer.getSecuredPort(), true, targetHostBaseUrl) : new ProxyPartitionKey(proxyServer.getHost(), proxyServer.getPort(), false, targetHostBaseUrl); } else { return targetHostBaseUrl; } } }