code: public boolean retryRequest(IOException exception, int executionCount, HttpContext context) {
  		LOG.debug("In retry request");
  		if (exception == null) {
  			throw new IllegalArgumentException("Exception parameter may not be null");
  		} else  if (context == null) {
  			throw new IllegalArgumentException("HTTP context may not be null");
  		}
  
  		if (executionCount > this.retryCount) {
  			return checkPolicy(executionCount);
  		} else if (exception instanceof NoHttpResponseException) {
  			// Retry if the server dropped connection on us
  			return checkPolicy(executionCount);
  		} else if (exception instanceof InterruptedIOException) {
  			// Timeout
  			return false;
  		} else if (exception instanceof UnknownHostException) {
  			// Unknown host
  			return false;
  		} else if (exception instanceof ConnectException) {
  			// Connection refused
  			return false;
  		} else if (exception instanceof SSLException) {
  			// SSL handshake exception
  			return false;
  		} else if (exception instanceof ProtocolException) {
  			// protocol exception
  			return false;
  		} else if (exception instanceof SaslException) {
  			// Sasl exception
  			return false;
  		}
  
  		HttpRequest request = (HttpRequest) context.getAttribute(HttpCoreContext.HTTP_REQUEST);
  		boolean idempotent = !(request instanceof HttpEntityEnclosingRequest);
  		if (idempotent) {
  			// Retry if the request is considered idempotent
  			return checkPolicy(executionCount);
  		}
  
  		Boolean b = (Boolean) context.getAttribute(HttpCoreContext.HTTP_REQ_SENT);
  		boolean sent = (b != null && b.booleanValue());
  
  		// if (!sent || this.requestSentRetryEnabled) {
  		// Retry if the request has not been sent fully or
  		// if it's OK to retry methods that have been sent
  		if (!sent) {
  			return checkPolicy(executionCount);
  		}
  		// otherwise do not retry
  		return false;
  	}
docs: method to validate the retry policies
  
  @return boolean