Class Http2ConnectionConfig

java.lang.Object
com.azure.cosmos.Http2ConnectionConfig

public class Http2ConnectionConfig extends Object
Represents the http2 connection config associated with Cosmos Client in the Azure Cosmos DB database service.
  • Constructor Details

    • Http2ConnectionConfig

      public Http2ConnectionConfig()
      The constructor of Http2ConnectionConfig.
  • Method Details

    • getMaxConnectionPoolSize

      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

      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

      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

      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

      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

      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

      public Boolean isEnabled()
      return the flag to indicate whether http2 is enabled.
      Returns:
      the flag to indicate whether http2 is enabled.
    • 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:
      enabled - the flag to indicate whether http2 is enabled.
      Returns:
      the current Http2ConnectionConfig.