ConnectionPolicy.setPreferredLocations(List<String> preferredLocations) Method

Definition

Sets the preferred locations for geo-replicated database accounts. For example, "East US" as the preferred location.

When EnableEndpointDiscovery is true and PreferredRegions is non-empty, the SDK will prefer to use the locations in the collection in the order they are specified to perform operations.

If EnableEndpointDiscovery is set to false, this property is ignored.

public void setPreferredLocations(List<String> preferredLocations)

Parameters

preferredLocations
List<String>

the list of preferred locations.

Applies to