public final class GatewayConnectionConfig extends Object
ConnectionMode.GATEWAY
associated with Cosmos Client in the Azure Cosmos DB database service.Constructor and Description |
---|
GatewayConnectionConfig()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static GatewayConnectionConfig |
getDefaultConfig()
Gets the default Gateway connection configuration.
|
Duration |
getIdleConnectionTimeout()
Gets the value of the timeout for an idle connection, the default is 60
seconds.
|
int |
getMaxConnectionPoolSize()
Gets the value of the connection pool size the client is using.
|
com.azure.core.http.ProxyOptions |
getProxy()
Gets the proxy options which contain the InetSocketAddress of proxy server.
|
GatewayConnectionConfig |
setIdleConnectionTimeout(Duration idleConnectionTimeout)
sets the value of the timeout for an idle connection.
|
GatewayConnectionConfig |
setMaxConnectionPoolSize(int maxConnectionPoolSize)
Sets the value of the connection pool size, the default
is 1000.
|
GatewayConnectionConfig |
setProxy(com.azure.core.http.ProxyOptions proxy)
Sets the proxy options.
|
String |
toString() |
public static GatewayConnectionConfig getDefaultConfig()
public int getMaxConnectionPoolSize()
public GatewayConnectionConfig setMaxConnectionPoolSize(int maxConnectionPoolSize)
maxConnectionPoolSize
- The value of the connection pool size.GatewayConnectionConfig
.public Duration getIdleConnectionTimeout()
public GatewayConnectionConfig setIdleConnectionTimeout(Duration idleConnectionTimeout)
idleConnectionTimeout
- the duration for an idle connection.GatewayConnectionConfig
.public com.azure.core.http.ProxyOptions getProxy()
public GatewayConnectionConfig setProxy(com.azure.core.http.ProxyOptions proxy)
proxy
- The proxy options.GatewayConnectionConfig
.Copyright © 2021 Microsoft Corporation. All rights reserved.