Class ClientOverrideConfiguration
- java.lang.Object
-
- software.amazon.awssdk.core.client.config.ClientOverrideConfiguration
-
- All Implemented Interfaces:
ToCopyableBuilder<ClientOverrideConfiguration.Builder,ClientOverrideConfiguration>
public final class ClientOverrideConfiguration extends Object implements ToCopyableBuilder<ClientOverrideConfiguration.Builder,ClientOverrideConfiguration>
Configuration values for which the client already provides sensible defaults. All values are optional, and not specifying them will use optimal values defined by the service itself.Use
builder()
to create a set of options.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ClientOverrideConfiguration.Builder
A builder forClientOverrideConfiguration
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Optional<T>
advancedOption(SdkAdvancedClientOption<T> option)
Load the optional requested advanced option that was configured on the client builder.Optional<Duration>
apiCallAttemptTimeout()
The amount of time to wait for the http request to complete before giving up and timing out.Optional<Duration>
apiCallTimeout()
The amount of time to allow the client to complete the execution of an API call.static ClientOverrideConfiguration.Builder
builder()
Create aClientOverrideConfiguration.Builder
, used to create aClientOverrideConfiguration
.Optional<CompressionConfiguration>
compressionConfiguration()
The compression configuration object, which includes options to enable/disable compression and set the minimum compression threshold.Optional<ProfileFile>
defaultProfileFile()
The profile file that should be used by default for all profile-based configuration in the SDK client.Optional<Supplier<ProfileFile>>
defaultProfileFileSupplier()
The profile file supplier that should be used by default for all profile-based configuration in the SDK client.Optional<String>
defaultProfileName()
The profile name that should be used by default for all profile-based configuration in the SDK client.ExecutionAttributes
executionAttributes()
Returns the additional execution attributes to be added for this client.List<ExecutionInterceptor>
executionInterceptors()
An immutable collection ofExecutionInterceptor
s that should be hooked into the execution of each request, in the order that they should be applied.Map<String,List<String>>
headers()
An unmodifiable representation of the set of HTTP headers that should be sent with every request.List<MetricPublisher>
metricPublishers()
The metric publishers to use to publisher metrics collected for this client.Optional<RetryPolicy>
retryPolicy()
The optional retry policy that should be used when handling failure cases.Optional<ScheduledExecutorService>
scheduledExecutorService()
The optional scheduled executor service that should be used for scheduling tasks such as async retry attempts and timeout task.ClientOverrideConfiguration.Builder
toBuilder()
String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
toBuilder
public ClientOverrideConfiguration.Builder toBuilder()
- Specified by:
toBuilder
in interfaceToCopyableBuilder<ClientOverrideConfiguration.Builder,ClientOverrideConfiguration>
-
builder
public static ClientOverrideConfiguration.Builder builder()
Create aClientOverrideConfiguration.Builder
, used to create aClientOverrideConfiguration
.
-
headers
public Map<String,List<String>> headers()
An unmodifiable representation of the set of HTTP headers that should be sent with every request.If not set, this will return an empty map.
-
retryPolicy
public Optional<RetryPolicy> retryPolicy()
The optional retry policy that should be used when handling failure cases.
-
advancedOption
public <T> Optional<T> advancedOption(SdkAdvancedClientOption<T> option)
Load the optional requested advanced option that was configured on the client builder.
-
executionInterceptors
public List<ExecutionInterceptor> executionInterceptors()
An immutable collection ofExecutionInterceptor
s that should be hooked into the execution of each request, in the order that they should be applied.
-
scheduledExecutorService
public Optional<ScheduledExecutorService> scheduledExecutorService()
The optional scheduled executor service that should be used for scheduling tasks such as async retry attempts and timeout task.The SDK will not automatically close the executor when the client is closed. It is the responsibility of the user to manually close the executor once all clients utilizing it have been closed.
-
apiCallTimeout
public Optional<Duration> apiCallTimeout()
The amount of time to allow the client to complete the execution of an API call. This timeout covers the entire client execution except for marshalling. This includes request handler execution, all HTTP requests including retries, unmarshalling, etc. This value should always be positive, if present.The api call timeout feature doesn't have strict guarantees on how quickly a request is aborted when the timeout is breached. The typical case aborts the request within a few milliseconds but there may occasionally be requests that don't get aborted until several seconds after the timer has been breached. Because of this, the client execution timeout feature should not be used when absolute precision is needed.
This may be used together with
apiCallAttemptTimeout()
to enforce both a timeout on each individual HTTP request (i.e. each retry) and the total time spent on all requests across retries (i.e. the 'api call' time).
-
apiCallAttemptTimeout
public Optional<Duration> apiCallAttemptTimeout()
The amount of time to wait for the http request to complete before giving up and timing out. This value should always be positive, if present.The request timeout feature doesn't have strict guarantees on how quickly a request is aborted when the timeout is breached. The typical case aborts the request within a few milliseconds but there may occasionally be requests that don't get aborted until several seconds after the timer has been breached. Because of this, the request timeout feature should not be used when absolute precision is needed.
This may be used together with
apiCallTimeout()
to enforce both a timeout on each individual HTTP request (i.e. each retry) and the total time spent on all requests across retries (i.e. the 'api call' time).
-
defaultProfileFileSupplier
public Optional<Supplier<ProfileFile>> defaultProfileFileSupplier()
The profile file supplier that should be used by default for all profile-based configuration in the SDK client.
-
defaultProfileFile
public Optional<ProfileFile> defaultProfileFile()
The profile file that should be used by default for all profile-based configuration in the SDK client.
-
defaultProfileName
public Optional<String> defaultProfileName()
The profile name that should be used by default for all profile-based configuration in the SDK client.
-
metricPublishers
public List<MetricPublisher> metricPublishers()
The metric publishers to use to publisher metrics collected for this client.- Returns:
- The metric publisher.
-
executionAttributes
public ExecutionAttributes executionAttributes()
Returns the additional execution attributes to be added for this client.
-
compressionConfiguration
public Optional<CompressionConfiguration> compressionConfiguration()
The compression configuration object, which includes options to enable/disable compression and set the minimum compression threshold.
-
-