public class ClientOptions extends Object
Constructor and Description |
---|
ClientOptions()
Create new
ClientOptions with default timeouts of 5
TimeUnit.SECONDS connection timeout and 15
TimeUnit.SECONDS read timeout. |
ClientOptions(Duration connectionTimeout,
Duration readTimeout)
Create new
ClientOptions . |
ClientOptions(int connectionTimeout,
int readTimeout)
Deprecated.
since 2.0, use
ClientOptions(Duration, Duration) for time unit
safety. |
Modifier and Type | Method and Description |
---|---|
Duration |
getConnectionTimeout() |
Duration |
getReadTimeout() |
public ClientOptions()
ClientOptions
with default timeouts of 5
TimeUnit.SECONDS
connection timeout and 15
TimeUnit.SECONDS
read timeout.@Deprecated public ClientOptions(int connectionTimeout, int readTimeout)
ClientOptions(Duration, Duration)
for time unit
safety.ClientOptions
.connectionTimeout
- connection timeout in TimeUnit.MILLISECONDS
, must
not be negative.readTimeout
- read timeout in TimeUnit.MILLISECONDS
, must not be
negative.public ClientOptions(Duration connectionTimeout, Duration readTimeout)
ClientOptions
.connectionTimeout
- connection timeout, must not be null.readTimeout
- read timeout in, must not be null.public Duration getConnectionTimeout()
TimeUnit.MILLISECONDS
.public Duration getReadTimeout()
TimeUnit.MILLISECONDS
.Copyright © 2016–2022 Pivotal Software, Inc.. All rights reserved.