public class TimeoutConfiguration extends Object
Constructor | Description |
---|---|
TimeoutConfiguration() |
Modifier and Type | Method | Description |
---|---|---|
TimeoutConfiguration |
connectionTimeout(Integer connectionTimeout) |
Sets the amount of time to wait (in milliseconds) when initially establishing a connection
before giving up and timing out.
|
Optional<Integer> |
getConnectionTimeout() |
Returns the amount of time to wait (in milliseconds) when initially establishing a connection
before giving up and timing out.
|
Optional<Integer> |
getSocketTimeout() |
Returns the amount of time to wait (in milliseconds) for data to be transferred over an
established, open connection before the connection times out and is closed.
|
Optional<Integer> |
getTotalExecutionTimeout() |
Returns the amount of time (in milliseconds) to allow the client to complete the execution of
an API call.
|
void |
setConnectionTimeout(Integer connectionTimeout) |
Sets the amount of time to wait (in milliseconds) when initially establishing a connection
before giving up and timing out.
|
void |
setSocketTimeout(Integer socketTimeout) |
Sets the amount of time to wait (in milliseconds) for data to be transferred over an
established, open connection before the connection times out and is closed.
|
void |
setTotalExecutionTimeout(Integer totalExecutionTimeout) |
Sets the amount of time (in milliseconds) to allow the client to complete the execution of
an API call.
|
TimeoutConfiguration |
socketTimeout(Integer socketTimeout) |
Sets the amount of time to wait (in milliseconds) for data to be transferred over an
established, open connection before the connection times out and is closed.
|
TimeoutConfiguration |
totalExecutionTimeout(Integer totalExecutionTimeout) |
Sets the amount of time (in milliseconds) to allow the client to complete the execution of
an API call.
|
public Optional<Integer> getSocketTimeout()
public void setSocketTimeout(Integer socketTimeout)
socketTimeout
- The amount of time to wait (in milliseconds) for data to be transferred over an
established, open connection before the connection is times out and is closed.public TimeoutConfiguration socketTimeout(Integer socketTimeout)
socketTimeout
- The amount of time to wait (in milliseconds) for data to be transferred over an
established, open connection before the connection is times out and is closed.public Optional<Integer> getConnectionTimeout()
public void setConnectionTimeout(Integer connectionTimeout)
connectionTimeout
- The amount of time to wait (in milliseconds) when initially establishing a
connection before giving up and timing out.public TimeoutConfiguration connectionTimeout(Integer connectionTimeout)
connectionTimeout
- The amount of time to wait (in milliseconds) when initially establishing a
connection before giving up and timing out.public Optional<Integer> getTotalExecutionTimeout()
This feature requires buffering the entire response (for non-streaming APIs) into memory to enforce a hard timeout when reading the response. For APIs that return large responses this could be expensive.
The total execution 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 timeout is disabled by default.
public void setTotalExecutionTimeout(Integer totalExecutionTimeout)
This feature requires buffering the entire response (for non-streaming APIs) into memory to enforce a hard timeout when reading the response. For APIs that return large responses this could be expensive.
The total execution 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 timeout is disabled by default.
totalExecutionTimeout
- The amount of time (in milliseconds) to allow the client to complete the execution
of an API call.public TimeoutConfiguration totalExecutionTimeout(Integer totalExecutionTimeout)
This feature requires buffering the entire response (for non-streaming APIs) into memory to enforce a hard timeout when reading the response. For APIs that return large responses this could be expensive.
The total execution 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 timeout is disabled by default.
totalExecutionTimeout
- The amount of time (in milliseconds) to allow the client to complete the execution
of an API call.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.