Package com.azure.cosmos
Class GatewayConnectionConfig
java.lang.Object
com.azure.cosmos.GatewayConnectionConfig
Represents the connection config with
ConnectionMode.GATEWAY
associated with Cosmos Client in the Azure Cosmos DB database service.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GatewayConnectionConfig
Gets the default Gateway connection configuration.Get the http2 connection config.Gets the value of the timeout for an idle connection, the default is 60 seconds.int
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.setHttp2ConnectionConfig
(Http2ConnectionConfig http2ConnectionConfig) Set the http2 connection config.setIdleConnectionTimeout
(Duration idleConnectionTimeout) sets the value of the timeout for an idle connection.setMaxConnectionPoolSize
(int maxConnectionPoolSize) Sets the value of the connection pool size, the default is 1000.setProxy
(com.azure.core.http.ProxyOptions proxy) Sets the proxy options.toString()
-
Constructor Details
-
GatewayConnectionConfig
public GatewayConnectionConfig()Constructor.
-
-
Method Details
-
getDefaultConfig
Gets the default Gateway connection configuration.- Returns:
- the default gateway connection configuration.
-
getMaxConnectionPoolSize
public int getMaxConnectionPoolSize()Gets the value of the connection pool size the client is using.- Returns:
- connection pool size.
-
setMaxConnectionPoolSize
Sets the value of the connection pool size, the default is 1000.- Parameters:
maxConnectionPoolSize
- The value of the connection pool size.- Returns:
- the
GatewayConnectionConfig
.
-
getIdleConnectionTimeout
Gets the value of the timeout for an idle connection, the default is 60 seconds.- Returns:
- Idle connection timeout duration.
-
setIdleConnectionTimeout
sets the value of the timeout for an idle connection. After that time, the connection will be automatically closed.- Parameters:
idleConnectionTimeout
- the duration for an idle connection.- Returns:
- the
GatewayConnectionConfig
.
-
getProxy
public com.azure.core.http.ProxyOptions getProxy()Gets the proxy options which contain the InetSocketAddress of proxy server.- Returns:
- the proxy options.
-
setProxy
Sets the proxy options.- Parameters:
proxy
- The proxy options.- Returns:
- the
GatewayConnectionConfig
.
-
getHttp2ConnectionConfig
@Beta(value=V4_69_0, warningText="Preview API - subject to change in non-backwards compatible way") public Http2ConnectionConfig getHttp2ConnectionConfig()Get the http2 connection config.- Returns:
- the
Http2ConnectionConfig
.
-
setHttp2ConnectionConfig
@Beta(value=V4_69_0, warningText="Preview API - subject to change in non-backwards compatible way") public GatewayConnectionConfig setHttp2ConnectionConfig(Http2ConnectionConfig http2ConnectionConfig) Set the http2 connection config.- Parameters:
http2ConnectionConfig
- theHttp2ConnectionConfig
.
-
toString
-