Package com.azure.cosmos
Class Http2ConnectionConfig
java.lang.Object
com.azure.cosmos.Http2ConnectionConfig
@Beta(value=V4_69_0,
warningText="Preview API - subject to change in non-backwards compatible way")
public class Http2ConnectionConfig
extends Object
Represents the http2 connection config associated with Cosmos Client in the Azure Cosmos DB database service.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the maximum number of the concurrent streams that can be opened to the remote peer.Get the maximum number of live connections to keep in the pool.Get the minimum number of live connections to keep in the pool (can be the best effort).return the flag to indicate whether http2 is enabled.setEnabled
(Boolean enabled) Configure the flag to indicate whether http2 is enabled.setMaxConcurrentStreams
(Integer maxConcurrentStreams) Configures the maximum number of the concurrent streams that can be opened to the remote peer.setMaxConnectionPoolSize
(Integer maxConnectionPoolSize) Configures the maximum number of live connections to keep in the pool.setMinConnectionPoolSize
(Integer minConnectionPoolSize) Configures the minimum number of live connections to keep in the pool (can be the best effort).
-
Constructor Details
-
Http2ConnectionConfig
@Beta(value=V4_69_0, warningText="Preview API - subject to change in non-backwards compatible way") public Http2ConnectionConfig()The constructor of Http2ConnectionConfig.
-
-
Method Details
-
getMaxConnectionPoolSize
@Beta(value=V4_69_0, warningText="Preview API - subject to change in non-backwards compatible way") public Integer getMaxConnectionPoolSize()Get the maximum number of live connections to keep in the pool.- Returns:
- the configured max number of live connections to keep in the pool.
-
setMaxConnectionPoolSize
@Beta(value=V4_69_0, warningText="Preview API - subject to change in non-backwards compatible way") 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:
maxConnectionPoolSize
- the maximum number of live connections to keep in the pool. If null, the default value `1000` will be applied for http/2.- Returns:
- the current
Http2ConnectionConfig
.
-
getMaxConcurrentStreams
@Beta(value=V4_69_0, warningText="Preview API - subject to change in non-backwards compatible way") public Integer getMaxConcurrentStreams()Get the maximum number of the concurrent streams that can be opened to the remote peer.- Returns:
- the maximum number of the concurrent streams that can be opened to the remote peer.
-
setMaxConcurrentStreams
@Beta(value=V4_69_0, warningText="Preview API - subject to change in non-backwards compatible way") 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:
maxConcurrentStreams
- the maximum number of the concurrent streams that can be opened to the remote peer. If null, the default value `30` will be applied for http/2.- Returns:
- the current
Http2ConnectionConfig
.
-
getMinConnectionPoolSize
@Beta(value=V4_69_0, warningText="Preview API - subject to change in non-backwards compatible way") public Integer getMinConnectionPoolSize()Get the minimum number of live connections to keep in the pool (can be the best effort).- Returns:
- the minimum number of live connections to keep in the pool (can be the best effort).
-
setMinConnectionPoolSize
@Beta(value=V4_69_0, warningText="Preview API - subject to change in non-backwards compatible way") 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:
minConnectionPoolSize
- the minimum number of live connections to keep in the pool (can be the best effort). If null, the default value `1` will be applied for http/2.- Returns:
- the current
Http2ConnectionConfig
.
-
isEnabled
@Beta(value=V4_69_0, warningText="Preview API - subject to change in non-backwards compatible way") public Boolean isEnabled()return the flag to indicate whether http2 is enabled.- Returns:
- the flag to indicate whether http2 is enabled.
-
setEnabled
@Beta(value=V4_69_0, warningText="Preview API - subject to change in non-backwards compatible way") 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:
enabled
- the flag to indicate whether http2 is enabled.- Returns:
- the current
Http2ConnectionConfig
.
-