public abstract class RequestOptions extends Object
| Constructor and Description |
|---|
RequestOptions()
Creates an instance of the
RequestOptions class. |
RequestOptions(RequestOptions other)
Creates an instance of the
RequestOptions class by copying values from another
RequestOptions instance. |
| Modifier and Type | Method and Description |
|---|---|
Boolean |
disableHttpsSocketKeepAlive()
Gets a value to indicate whether https socket keep-alive should be disabled.
|
LocationMode |
getLocationMode()
Gets the default location mode for this request.
|
Integer |
getMaximumExecutionTimeInMs()
Gets the maximum execution time for this request.
|
Long |
getOperationExpiryTimeInMs()
RESERVED FOR INTERNAL USE.
|
RetryPolicyFactory |
getRetryPolicyFactory()
Gets the retry policy to use for this request.
|
Integer |
getTimeoutIntervalInMs()
Returns the timeout value for this request.
|
Boolean |
requireEncryption()
Gets a value to indicate whether all data written and read must be encrypted.
|
void |
setDisableHttpsSocketKeepAlive(Boolean disableHttpsSocketKeepAlive)
Sets a value to indicate whether https socket keep-alive should be disabled.
|
void |
setLocationMode(LocationMode locationMode)
Sets the
LocationMode for this request. |
void |
setMaximumExecutionTimeInMs(Integer maximumExecutionTimeInMs)
Sets the maximum execution time to use when making this request.
|
void |
setRequireEncryption(Boolean requireEncryption)
Sets a value to indicate whether all data written and read must be encrypted.
|
void |
setRetryPolicyFactory(RetryPolicyFactory retryPolicyFactory)
Sets the RetryPolicyFactory object to use for this request.
|
void |
setTimeoutIntervalInMs(Integer timeoutIntervalInMs)
Sets the timeout to use when making this request.
|
public RequestOptions()
RequestOptions class.public RequestOptions(RequestOptions other)
RequestOptions class by copying values from another
RequestOptions instance.other - A RequestOptions object that represents the request options to copy.public final RetryPolicyFactory getRetryPolicyFactory()
setRetryPolicyFactory(RetryPolicyFactory).RetryPolicyFactory object that represents the current retry policy.RetryPolicy,
RetryExponentialRetry,
RetryLinearRetry,
RetryNoRetrypublic final Integer getTimeoutIntervalInMs()
setTimeoutIntervalInMs(Integer).public final LocationMode getLocationMode()
setLocationMode(LocationMode).LocationMode object that represents the location mode for this request.public Integer getMaximumExecutionTimeInMs()
setMaximumExecutionTimeInMs(Integer).public Boolean requireEncryption()
true to
encrypt/decrypt data for transactions; otherwise, false. For more
information about require encryption defaults, see setRequireEncryption(Boolean).public Boolean disableHttpsSocketKeepAlive()
true to disable
keep-alive; otherwise, false. For more information about disableHttpsSocketKeepAlive defaults, see
ServiceClient.getDefaultRequestOptions()public Long getOperationExpiryTimeInMs()
setMaximumExecutionTimeInMs(Integer).public final void setRetryPolicyFactory(RetryPolicyFactory retryPolicyFactory)
The default RetryPolicyFactory is set in the client and is by default RetryExponentialRetry. You can
change the RetryPolicyFactory on this request by setting this property. You can also change the value on the
ServiceClient.getDefaultRequestOptions() object so that all subsequent requests made via the service
client will use that RetryPolicyFactory.
retryPolicyFactory - the RetryPolicyFactory object to use when making service requests.RetryPolicy,
RetryExponentialRetry,
RetryLinearRetry,
RetryNoRetrypublic final void setTimeoutIntervalInMs(Integer timeoutIntervalInMs)
The server timeout interval begins at the time that the complete request has been received by the service, and the server begins processing the response. If the timeout interval elapses before the response is returned to the client, the operation times out. The timeout interval resets with each retry, if the request is retried.
The default server timeout is set in the client and is by default null, indicating no server timeout. You can
change the server timeout on this request by setting this property. You can also change the value on the
ServiceClient.getDefaultRequestOptions() object so that all subsequent requests made via the service
client will use that server timeout.
timeoutIntervalInMs - The timeout, in milliseconds, to use for this request.public void setLocationMode(LocationMode locationMode)
LocationMode for this request.
The default LocationMode is set in the client and is by default LocationMode.PRIMARY_ONLY. You
can change the LocationMode on this request by setting this property. You can also change the value on
the ServiceClient.getDefaultRequestOptions() object so that all subsequent requests made via the service
client will use that LocationMode.
locationMode - the locationMode to setpublic void setMaximumExecutionTimeInMs(Integer maximumExecutionTimeInMs)
The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while uploading data, downloading data, and before executing retries. The service will continue to upload, download, and retry until the maximum execution time is reached. At that time, any partial uploads or downloads will be cancelled and an exception will be thrown.
The default maximum execution is set in the client and is by default null, indicating no maximum time. You can
change the maximum execution time on this request by setting this property. You can also change the value on the
ServiceClient.getDefaultRequestOptions() object so that all subsequent requests made via the service
client will use the maximum execution time.
maximumExecutionTimeInMs - The maximum execution time, in milliseconds, to use for this request.public void setRequireEncryption(Boolean requireEncryption)
true to
encrypt/decrypt data for transactions; otherwise, false.
The default is set in the client and is by default false, indicating encryption is not required. You can change
the value on this request by setting this property. You can also change the value on the
ServiceClient.getDefaultRequestOptions() object so that all subsequent requests made via the
service client will use the appropriate value.
requireEncryption - A value to indicate whether all data written and read must be encrypted.public void setDisableHttpsSocketKeepAlive(Boolean disableHttpsSocketKeepAlive)
true to disable
keep-alive; otherwise, false
The default is set in the client and is by default true, indicating that https socket keep-alive will be
disabled. You can change the value on this request by setting this property. You can also change the value on
on the ServiceClient.getDefaultRequestOptions() object so that all subsequent requests made via the
service client will use the appropriate value.
Setting keep-alive on https sockets is to work around a bug in the JVM where connection timeouts are not honored on retried requests. In those cases, you may choose to use socket keep-alive as a fallback. Unfortunately, the timeout value must be taken from a JVM property rather than configured locally. Therefore, in rare cases the JVM has configured aggressively short keep-alive times, it may not be beneficial to enable the use of keep-alives lest they interfere with long running data transfer operations.
disableHttpsSocketKeepAlive - A value to indicate whether https socket keep-alive should be disabled.Copyright © 2021. All Rights Reserved.