Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
GatewayConnectionConfig Class
- Package:
- com.azure.cosmos
- Maven Artifact:
- com.azure:azure-cosmos:4.80.0
- java.lang.Object
- com.azure.cosmos.GatewayConnectionConfig
public final class GatewayConnectionConfig
Represents the connection config with GATEWAY associated with Cosmos Client in the Azure Cosmos DB database service.
Constructor Summary
| Constructor | Description |
|---|---|
| GatewayConnectionConfig() |
Constructor. |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| static GatewayConnectionConfig |
getDefaultConfig()
Gets the default Gateway connection configuration. |
| Http2ConnectionConfig |
getHttp2ConnectionConfig()
Get the http2 connection config. |
| 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. |
| ProxyOptions |
getProxy()
Gets the proxy options which contain the InetSocketAddress of proxy server. |
| GatewayConnectionConfig |
setHttp2ConnectionConfig(Http2ConnectionConfig http2ConnectionConfig)
Set the http2 connection config. |
| 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(ProxyOptions proxy)
Sets the proxy options. |
| String | toString() |
Methods inherited from java.lang.Object
Constructor Details
GatewayConnectionConfig
public GatewayConnectionConfig()
Constructor.
Method Details
getDefaultConfig
public static GatewayConnectionConfig getDefaultConfig()
Gets the default Gateway connection configuration.
Returns:
getHttp2ConnectionConfig
public Http2ConnectionConfig getHttp2ConnectionConfig()
Get the http2 connection config.
Returns:
getIdleConnectionTimeout
public Duration getIdleConnectionTimeout()
Gets the value of the timeout for an idle connection, the default is 60 seconds.
Returns:
getMaxConnectionPoolSize
public int getMaxConnectionPoolSize()
Gets the value of the connection pool size the client is using.
Returns:
getProxy
public ProxyOptions getProxy()
Gets the proxy options which contain the InetSocketAddress of proxy server.
Returns:
setHttp2ConnectionConfig
public GatewayConnectionConfig setHttp2ConnectionConfig(Http2ConnectionConfig http2ConnectionConfig)
Set the http2 connection config.
Parameters:
setIdleConnectionTimeout
public GatewayConnectionConfig setIdleConnectionTimeout(Duration idleConnectionTimeout)
sets the value of the timeout for an idle connection. After that time, the connection will be automatically closed.
Parameters:
Returns:
setMaxConnectionPoolSize
public GatewayConnectionConfig setMaxConnectionPoolSize(int maxConnectionPoolSize)
Sets the value of the connection pool size, the default is 1000.
Parameters:
Returns:
setProxy
public GatewayConnectionConfig setProxy(ProxyOptions proxy)
Sets the proxy options.
Parameters:
Returns:
toString
public String toString()
Overrides:
GatewayConnectionConfig.toString()Applies to
Azure SDK for Java
Feedback
Was this page helpful?
