CosmosClientBuilder.endpointDiscoveryEnabled(boolean endpointDiscoveryEnabled) Method

Definition

Sets the flag to enable endpoint discovery for geo-replicated database accounts.

When EnableEndpointDiscovery is true, the SDK will automatically discover the current write and read regions to ensure requests are sent to the correct region based on the capability of the region and the user's preference.

The default value for this property is true indicating endpoint discovery is enabled.

public CosmosClientBuilder endpointDiscoveryEnabled(boolean endpointDiscoveryEnabled)

Parameters

endpointDiscoveryEnabled
boolean

true if EndpointDiscovery is enabled.

Returns

current CosmosClientBuilder

Applies to