Uses of Class
com.azure.cosmos.CosmosClientBuilder
Package
Description
This package provides interfaces for interacting with Azure Cosmos DB.
-
Uses of CosmosClientBuilder in com.azure.cosmos
Modifier and TypeMethodDescriptionCosmosClientBuilder.authorizationTokenResolver
(CosmosAuthorizationTokenResolver cosmosAuthorizationTokenResolver) Sets the token resolverCosmosClientBuilder.clientTelemetryConfig
(CosmosClientTelemetryConfig telemetryConfig) Returns the client telemetry config instance for this builderCosmosClientBuilder.clientTelemetryEnabled
(boolean clientTelemetryEnabled) Sets the flag to enable client telemetry which will periodically collect database operations aggregation statistics, system information like cpu/memory and send it to cosmos monitoring service, which will be helpful during debugging.CosmosClientBuilder.connectionSharingAcrossClientsEnabled
(boolean connectionSharingAcrossClientsEnabled) Enables connections sharing across multiple Cosmos Clients.CosmosClientBuilder.consistencyLevel
(ConsistencyLevel desiredConsistencyLevel) CosmosClientBuilder.contentResponseOnWriteEnabled
(boolean contentResponseOnWriteEnabled) Sets the boolean to only return the headers and status code in Cosmos DB response in case of Create, Update and Delete operations on CosmosItem.CosmosClientBuilder.credential
(com.azure.core.credential.AzureKeyCredential credential) Sets theAzureKeyCredential
to be usedCosmosClientBuilder.credential
(com.azure.core.credential.TokenCredential credential) Sets theTokenCredential
used to authorize requests sent to the service.CosmosClientBuilder.directMode()
Sets the default DIRECT connection configuration to be used.CosmosClientBuilder.directMode
(DirectConnectionConfig directConnectionConfig) Sets the DIRECT connection configuration to be used.CosmosClientBuilder.directMode
(DirectConnectionConfig directConnectionConfig, GatewayConnectionConfig gatewayConnectionConfig) Sets the DIRECT connection configuration to be used.Sets the Azure Cosmos DB endpoint the SDK will connect toCosmosClientBuilder.endpointDiscoveryEnabled
(boolean endpointDiscoveryEnabled) Sets the flag to enable endpoint discovery for geo-replicated database accounts.CosmosClientBuilder.endToEndOperationLatencyPolicyConfig
(CosmosEndToEndOperationLatencyPolicyConfig cosmosEndToEndOperationLatencyPolicyConfig) Sets theCosmosEndToEndOperationLatencyPolicyConfig
on the clientCosmosClientBuilder.excludedRegionsSupplier
(Supplier<CosmosExcludedRegions> excludedRegionsSupplier) Sets aSupplier<CosmosExcludedRegions>
which returns aCosmosExcludedRegions
instance whenSupplier.get()
is invoked.CosmosClientBuilder.gatewayMode()
Sets the default GATEWAY connection configuration to be used.CosmosClientBuilder.gatewayMode
(GatewayConnectionConfig gatewayConnectionConfig) Sets the GATEWAY connection configuration to be used.Sets either a master or readonly key used to perform authentication for accessing resource.CosmosClientBuilder.multipleWriteRegionsEnabled
(boolean multipleWriteRegionsEnabled) Sets the flag to enable writes on any regions for geo-replicated database accounts in the Azure Cosmos DB service.CosmosClientBuilder.openConnectionsAndInitCaches
(CosmosContainerProactiveInitConfig proactiveContainerInitConfig) Sets theCosmosContainerProactiveInitConfig
which enable warming up of caches and connections associated with containers obtained fromCosmosContainerProactiveInitConfig.getCosmosContainerIdentities()
to replicas obtained from the first k preferred regions where k evaluates toCosmosContainerProactiveInitConfig.getProactiveConnectionRegionsCount()
.CosmosClientBuilder.permissions
(List<CosmosPermissionProperties> permissions) Sets the permission list, which contains the resource tokens needed to access resources.CosmosClientBuilder.preferredRegions
(List<String> preferredRegions) Sets the preferred regions for geo-replicated database accounts.CosmosClientBuilder.readRequestsFallbackEnabled
(boolean readRequestsFallbackEnabled) Sets whether to allow for reads to go to multiple regions configured on an account of Azure Cosmos DB service.CosmosClientBuilder.resourceToken
(String resourceToken) Sets a resource token used to perform authentication for accessing resource.CosmosClientBuilder.sessionCapturingOverrideEnabled
(boolean sessionCapturingOverrideEnabled) Session capturing is enabled by default forConsistencyLevel.SESSION
.CosmosClientBuilder.sessionRetryOptions
(SessionRetryOptions sessionRetryOptions) Sets theSessionRetryOptions
instance on the client.CosmosClientBuilder.throttlingRetryOptions
(ThrottlingRetryOptions throttlingRetryOptions) Sets the retry policy options associated with the DocumentClient instance.CosmosClientBuilder.userAgentSuffix
(String userAgentSuffix) sets the value of the user-agent suffix.