File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
google-http-client/src/main/java/com/google/api/client/http Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,15 @@ public final class HttpRequest {
6464 */
6565 public static final String USER_AGENT_SUFFIX = "Google-HTTP-Java-Client/" + VERSION + " (gzip)" ;
6666
67+ /**
68+ * The default number of retries that will be allowed to execute before the request will be
69+ * terminated.
70+ *
71+ * @see #getNumberOfRetries
72+ * @since 1.22
73+ */
74+ public static final int DEFAULT_NUMBER_OF_RETRIES = 10 ;
75+
6776 /**
6877 * HTTP request execute interceptor to intercept the start of {@link #execute()} (before executing
6978 * the HTTP request) or {@code null} for none.
@@ -98,7 +107,7 @@ static String executeAndGetValueOfSomeCustomHeader(HttpRequest request) {
98107 * {@link HttpUnsuccessfulResponseHandler} or {@link HttpIOExceptionHandler} which handles
99108 * abnormal HTTP response or the I/O exception.
100109 */
101- private int numRetries = 10 ;
110+ private int numRetries = DEFAULT_NUMBER_OF_RETRIES ;
102111
103112 /**
104113 * Determines the limit to the content size that will be logged during {@link #execute()}.
@@ -647,7 +656,7 @@ public int getNumberOfRetries() {
647656 * abnormal HTTP response or the I/O exception.
648657 *
649658 * <p>
650- * The default value is {@code 10 }.
659+ * The default value is {@link #DEFAULT_NUMBER_OF_RETRIES }.
651660 * </p>
652661 *
653662 * @since 1.5
You can’t perform that action at this time.
0 commit comments