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 propertiessetAggressiveWarmupDuration
(Duration aggressiveWarmupDuration) Sets the time window represented as aDuration
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 mannersetProactiveConnectionRegionsCount
(int numProactiveConnectionRegions) Sets the no. of regions to proactively connect to.
-
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
-
setAggressiveWarmupDuration
public CosmosContainerProactiveInitConfigBuilder setAggressiveWarmupDuration(Duration aggressiveWarmupDuration) Sets the time window represented as aDuration
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:
aggressiveWarmupDuration
- this denotes the aggressive proactive connection establishment duration to be set- Returns:
- current
CosmosContainerProactiveInitConfigBuilder
-
build
BuildsCosmosContainerProactiveInitConfig
with the provided properties- Returns:
- an instance of
CosmosContainerProactiveInitConfig
-