-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
annie-mac
committed
Nov 28, 2024
1 parent
edcab14
commit 15b2456
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
...zure-cosmos/src/main/java/com/azure/cosmos/implementation/http/Http2ConnectionConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
package com.azure.cosmos.implementation.http; | ||
|
||
import com.azure.cosmos.implementation.Configs; | ||
|
||
// [TODO Http2]: when adding public API, making this class public, add setter method | ||
public class Http2ConnectionConfig { | ||
private int maxConnectionPoolSize; | ||
private int minConnectionPoolSize; | ||
private int maxConcurrentStreams; | ||
private boolean enabled; | ||
|
||
public Http2ConnectionConfig() { | ||
this.maxConnectionPoolSize = Configs.getHttp2MaxConnectionPoolSize(); | ||
this.minConnectionPoolSize = Configs.getHttp2MinConnectionPoolSize(); | ||
this.maxConcurrentStreams = Configs.getHttp2MaxConcurrentStreams(); | ||
this.enabled = Configs.isHttp2Enabled(); | ||
} | ||
|
||
public int getMaxConnectionPoolSize() { | ||
return maxConnectionPoolSize; | ||
} | ||
|
||
public int getMinConnectionPoolSize() { | ||
return minConnectionPoolSize; | ||
} | ||
|
||
public int getMaxConcurrentStreams() { | ||
return maxConcurrentStreams; | ||
} | ||
|
||
public boolean isEnabled() { | ||
return enabled; | ||
} | ||
} |