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 {
64
64
*/
65
65
public static final String USER_AGENT_SUFFIX = "Google-HTTP-Java-Client/" + VERSION + " (gzip)" ;
66
66
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
+
67
76
/**
68
77
* HTTP request execute interceptor to intercept the start of {@link #execute()} (before executing
69
78
* the HTTP request) or {@code null} for none.
@@ -98,7 +107,7 @@ static String executeAndGetValueOfSomeCustomHeader(HttpRequest request) {
98
107
* {@link HttpUnsuccessfulResponseHandler} or {@link HttpIOExceptionHandler} which handles
99
108
* abnormal HTTP response or the I/O exception.
100
109
*/
101
- private int numRetries = 10 ;
110
+ private int numRetries = DEFAULT_NUMBER_OF_RETRIES ;
102
111
103
112
/**
104
113
* Determines the limit to the content size that will be logged during {@link #execute()}.
@@ -647,7 +656,7 @@ public int getNumberOfRetries() {
647
656
* abnormal HTTP response or the I/O exception.
648
657
*
649
658
* <p>
650
- * The default value is {@code 10 }.
659
+ * The default value is {@link #DEFAULT_NUMBER_OF_RETRIES }.
651
660
* </p>
652
661
*
653
662
* @since 1.5
You can’t perform that action at this time.
0 commit comments