Skip to content

Commit 459fae9

Browse files
authored
Improve Javadoc for request-level timeout (#3771)
* Improve Javadoc for request-level timeout * Update docs * Fix checkstyle
1 parent c7caed9 commit 459fae9

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

core/sdk-core/src/main/java/software/amazon/awssdk/core/RequestOverrideConfiguration.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import java.util.function.Consumer;
2828
import software.amazon.awssdk.annotations.Immutable;
2929
import software.amazon.awssdk.annotations.SdkPublicApi;
30+
import software.amazon.awssdk.core.client.config.ClientOverrideConfiguration;
3031
import software.amazon.awssdk.core.interceptor.ExecutionAttribute;
3132
import software.amazon.awssdk.core.interceptor.ExecutionAttributes;
3233
import software.amazon.awssdk.core.signer.Signer;
@@ -333,6 +334,10 @@ default B putRawQueryParameter(String name, String value) {
333334
* <p>This may be used together with {@link #apiCallAttemptTimeout()} to enforce both a timeout on each individual HTTP
334335
* request (i.e. each retry) and the total time spent on all requests across retries (i.e. the 'api call' time).
335336
*
337+
* <p>
338+
* Note that this timeout takes precedence over the value configured at client level via
339+
* {@link ClientOverrideConfiguration.Builder#apiCallTimeout(Duration)}.
340+
*
336341
* @see RequestOverrideConfiguration#apiCallTimeout()
337342
*/
338343
B apiCallTimeout(Duration apiCallTimeout);
@@ -351,6 +356,10 @@ default B putRawQueryParameter(String name, String value) {
351356
* <p>This may be used together with {@link #apiCallTimeout()} to enforce both a timeout on each individual HTTP
352357
* request (i.e. each retry) and the total time spent on all requests across retries (i.e. the 'api call' time).
353358
*
359+
* <p>
360+
* Note that this timeout takes precedence over the value configured at client level via
361+
* {@link ClientOverrideConfiguration.Builder#apiCallAttemptTimeout(Duration)}.
362+
*
354363
* @see RequestOverrideConfiguration#apiCallAttemptTimeout()
355364
*/
356365
B apiCallAttemptTimeout(Duration apiCallAttemptTimeout);

core/sdk-core/src/main/java/software/amazon/awssdk/core/client/config/ClientOverrideConfiguration.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import java.util.function.Consumer;
2727
import software.amazon.awssdk.annotations.SdkPublicApi;
2828
import software.amazon.awssdk.annotations.ToBuilderIgnoreField;
29+
import software.amazon.awssdk.core.RequestOverrideConfiguration;
2930
import software.amazon.awssdk.core.interceptor.ExecutionAttribute;
3031
import software.amazon.awssdk.core.interceptor.ExecutionAttributes;
3132
import software.amazon.awssdk.core.interceptor.ExecutionInterceptor;
@@ -372,6 +373,10 @@ default Builder retryPolicy(RetryMode retryMode) {
372373
* <p>This may be used together with {@link #apiCallAttemptTimeout()} to enforce both a timeout on each individual HTTP
373374
* request (i.e. each retry) and the total time spent on all requests across retries (i.e. the 'api call' time).
374375
*
376+
* <p>
377+
* You can also configure it on a per-request basis via
378+
* {@link RequestOverrideConfiguration.Builder#apiCallTimeout(Duration)}.
379+
* Note that request-level timeout takes precedence.
375380
*
376381
* @see ClientOverrideConfiguration#apiCallTimeout()
377382
*/
@@ -394,6 +399,11 @@ default Builder retryPolicy(RetryMode retryMode) {
394399
* <p>This may be used together with {@link #apiCallTimeout()} to enforce both a timeout on each individual HTTP
395400
* request (i.e. each retry) and the total time spent on all requests across retries (i.e. the 'api call' time).
396401
*
402+
* <p>
403+
* You can also configure it on a per-request basis via
404+
* {@link RequestOverrideConfiguration.Builder#apiCallAttemptTimeout(Duration)}.
405+
* Note that request-level timeout takes precedence.
406+
*
397407
* @see ClientOverrideConfiguration#apiCallAttemptTimeout()
398408
*/
399409
Builder apiCallAttemptTimeout(Duration apiCallAttemptTimeout);

0 commit comments

Comments
 (0)