Package com.azure.cosmos
Class CosmosContainerProactiveInitConfigBuilder
java.lang.Object
com.azure.cosmos.CosmosContainerProactiveInitConfigBuilder
A builder to build
CosmosContainerProactiveInitConfig
-
Constructor Summary
ConstructorDescriptionCosmosContainerProactiveInitConfigBuilder
(List<CosmosContainerIdentity> cosmosContainerIdentities) InstantiatesCosmosContainerProactiveInitConfigBuilder
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
BuildsCosmosContainerProactiveInitConfig
with the provided propertiessetProactiveConnectionRegionsCount
(int numProactiveConnectionRegions) Sets the no.
-
Constructor Details
-
CosmosContainerProactiveInitConfigBuilder
public CosmosContainerProactiveInitConfigBuilder(List<CosmosContainerIdentity> cosmosContainerIdentities) InstantiatesCosmosContainerProactiveInitConfigBuilder
- Parameters:
cosmosContainerIdentities
- the container identities - this parameter must be non-empty
-
-
Method Details
-
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 thanMAX_NO_OF_PROACTIVE_CONNECTION_REGIONS
.- Parameters:
numProactiveConnectionRegions
- the no of proactive connection regions- Returns:
- Current
CosmosContainerProactiveInitConfigBuilder
-
build
BuildsCosmosContainerProactiveInitConfig
with the provided properties- Returns:
- an instance of
CosmosContainerProactiveInitConfig
-