你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
CosmosContainerProactiveInitConfigBuilder Class
- java.
lang. Object - com.
azure. cosmos. CosmosContainerProactiveInitConfigBuilder
- com.
public final class CosmosContainerProactiveInitConfigBuilder
A builder to build CosmosContainerProactiveInitConfig
Constructor Summary
Constructor | Description |
---|---|
CosmosContainerProactiveInitConfigBuilder(List<CosmosContainerIdentity> cosmosContainerIdentities) |
Instantiates CosmosContainerProactiveInitConfigBuilder |
Method Summary
Modifier and Type | Method and Description |
---|---|
Cosmos |
build()
Builds CosmosContainerProactiveInitConfig with the provided properties |
Cosmos |
setAggressiveWarmupDuration(Duration aggressiveWarmupDuration)
Sets the time window represented as a Duration within which connections will be opened aggressively and in a blocking manner and outside which connections will be opened defensively and in a non-blocking manner |
Cosmos |
setProactiveConnectionRegionsCount(int numProactiveConnectionRegions)
Sets the no. |
Methods inherited from java.lang.Object
Constructor Details
CosmosContainerProactiveInitConfigBuilder
public CosmosContainerProactiveInitConfigBuilder(List
Instantiates CosmosContainerProactiveInitConfigBuilder
Parameters:
Method Details
build
public CosmosContainerProactiveInitConfig build()
Builds CosmosContainerProactiveInitConfig with the provided properties
Returns:
setAggressiveWarmupDuration
public CosmosContainerProactiveInitConfigBuilder setAggressiveWarmupDuration(Duration aggressiveWarmupDuration)
Sets the time window represented as a Duration within which connections will be opened aggressively and in a blocking manner and outside which connections will be opened defensively and in a non-blocking manner
Parameters:
Returns:
setProactiveConnectionRegionsCount
public CosmosContainerProactiveInitConfigBuilder setProactiveConnectionRegionsCount(int numProactiveConnectionRegions)
Sets the no. of regions to proactively connect to.
The no of proactive regions to connect to belong to the preferred list of regions In order to minimize latencies associated with warming up caches and opening connections the no. of proactive connection regions cannot be more than CosmosContainerProactiveInitConfigBuilder#MAX_NO_OF_PROACTIVE_CONNECTION_REGIONS.
Parameters:
Returns: