Http2ConnectionConfig Class
- java.
lang. Object - com.
azure. cosmos. Http2ConnectionConfig
- com.
public class Http2ConnectionConfig
Represents the http2 connection config associated with Cosmos Client in the Azure Cosmos DB database service.
Constructor Summary
Constructor | Description |
---|---|
Http2ConnectionConfig() |
The constructor of Http2Connection |
Method Summary
Modifier and Type | Method and Description |
---|---|
Integer |
getMaxConcurrentStreams()
Get the maximum number of the concurrent streams that can be opened to the remote peer. |
Integer |
getMaxConnectionPoolSize()
Get the maximum number of live connections to keep in the pool. |
Integer |
getMinConnectionPoolSize()
Get the minimum number of live connections to keep in the pool (can be the best effort). |
Boolean |
isEnabled()
return the flag to indicate whether http2 is enabled. |
Http2Connection |
setEnabled(Boolean enabled)
Configure the flag to indicate whether http2 is enabled. |
Http2Connection |
setMaxConcurrentStreams(Integer maxConcurrentStreams)
Configures the maximum number of the concurrent streams that can be opened to the remote peer. |
Http2Connection |
setMaxConnectionPoolSize(Integer maxConnectionPoolSize)
Configures the maximum number of live connections to keep in the pool. |
Http2Connection |
setMinConnectionPoolSize(Integer minConnectionPoolSize)
Configures the minimum number of live connections to keep in the pool (can be the best effort). |
Methods inherited from java.lang.Object
Constructor Details
Http2ConnectionConfig
public Http2ConnectionConfig()
The constructor of Http2ConnectionConfig.
Method Details
getMaxConcurrentStreams
public Integer getMaxConcurrentStreams()
Get the maximum number of the concurrent streams that can be opened to the remote peer.
Returns:
getMaxConnectionPoolSize
public Integer getMaxConnectionPoolSize()
Get the maximum number of live connections to keep in the pool.
Returns:
getMinConnectionPoolSize
public Integer getMinConnectionPoolSize()
Get the minimum number of live connections to keep in the pool (can be the best effort).
Returns:
isEnabled
public Boolean isEnabled()
return the flag to indicate whether http2 is enabled.
Returns:
setEnabled
public Http2ConnectionConfig setEnabled(Boolean enabled)
Configure the flag to indicate whether http2 is enabled. If null, the default value (`false` while in preview, `true` later) will be applied for http/2.
Parameters:
Returns:
setMaxConcurrentStreams
public Http2ConnectionConfig setMaxConcurrentStreams(Integer maxConcurrentStreams)
Configures the maximum number of the concurrent streams that can be opened to the remote peer. When evaluating how many streams can be opened to the remote peer, the minimum of this configuration and the remote peer configuration is taken (unless -1 is used). Default to 30.
Parameters:
30
will be applied for http/2.
Returns:
setMaxConnectionPoolSize
public Http2ConnectionConfig setMaxConnectionPoolSize(Integer maxConnectionPoolSize)
Configures the maximum number of live connections to keep in the pool. If not configured, will be default to 1000.
Parameters:
1000
will be applied for http/2.
Returns:
setMinConnectionPoolSize
public Http2ConnectionConfig setMinConnectionPoolSize(Integer minConnectionPoolSize)
Configures the minimum number of live connections to keep in the pool (can be the best effort). Default to 1.
Parameters:
1
will be applied for http/2.
Returns: