public class TimeoutConfiguration extends Object
| Constructor and Description |
|---|
TimeoutConfiguration() |
| Modifier and Type | Method and 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> |
getHttpRequestTimeout()
Returns the amount of time to wait (in milliseconds) for a HTTP request to complete 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.
|
TimeoutConfiguration |
httpRequestTimeout(Integer httpRequestTimeout)
Sets the amount of time to wait (in milliseconds) for a single HTTP request to complete before giving
up and timing out.
|
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 |
setHttpRequestTimeout(Integer httpRequestTimeout)
Sets the amount of time to wait (in milliseconds) for a single HTTP request to complete 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()
Default value is .
public void setSocketTimeout(Integer socketTimeout)
Default value is .
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)
Default value is .
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()
Default value is 10000.
public void setConnectionTimeout(Integer connectionTimeout)
Default value is 10000.
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)
Default value is 10000.
connectionTimeout - The amount of time to wait (in milliseconds) when initially establishing a
connection before giving up and timing out.public Optional<Integer> getHttpRequestTimeout()
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 http 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, this feature should not be used when absolute precision is needed.
Default value is 0, which indicates the feature is disabled.
public void setHttpRequestTimeout(Integer httpRequestTimeout)
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 http 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, this feature should not be used when absolute precision is needed.
This timeout is disabled by default.
httpRequestTimeout - The amount of time to wait (in milliseconds) for the request to complete before
giving up and timing out.public TimeoutConfiguration httpRequestTimeout(Integer httpRequestTimeout)
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 http 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, this feature should not be used when absolute precision is needed.
This timeout is disabled by default.
httpRequestTimeout - The amount of time to wait (in milliseconds) for the request to complete 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 © 2019. All rights reserved.