public final class ClientOverrideConfiguration extends Object implements ToCopyableBuilder<ClientOverrideConfiguration.Builder,ClientOverrideConfiguration>
Use builder()
to create a set of options.
Modifier and Type | Class and Description |
---|---|
static interface |
ClientOverrideConfiguration.Builder
A builder for
ClientOverrideConfiguration . |
Modifier and Type | Method and 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 a
ClientOverrideConfiguration.Builder , used to create a ClientOverrideConfiguration . |
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<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 of
ExecutionInterceptor 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() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
copy
public ClientOverrideConfiguration.Builder toBuilder()
toBuilder
in interface ToCopyableBuilder<ClientOverrideConfiguration.Builder,ClientOverrideConfiguration>
public static ClientOverrideConfiguration.Builder builder()
ClientOverrideConfiguration.Builder
, used to create a ClientOverrideConfiguration
.public Map<String,List<String>> headers()
If not set, this will return an empty map.
public Optional<RetryPolicy> retryPolicy()
public <T> Optional<T> advancedOption(SdkAdvancedClientOption<T> option)
public List<ExecutionInterceptor> executionInterceptors()
ExecutionInterceptor
s that should be hooked into the execution of each request, in the
order that they should be applied.public Optional<ScheduledExecutorService> scheduledExecutorService()
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.
public Optional<Duration> apiCallTimeout()
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).
public Optional<Duration> apiCallAttemptTimeout()
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).
public Optional<ProfileFile> defaultProfileFile()
public Optional<String> defaultProfileName()
public List<MetricPublisher> metricPublishers()
public ExecutionAttributes executionAttributes()
public Optional<CompressionConfiguration> compressionConfiguration()
Copyright © 2023. All rights reserved.