Modifier and Type | Method and Description |
---|---|
ConnectionPolicy |
CosmosClientBuilder.getConnectionPolicy()
Gets the (@link ConnectionPolicy) to be used
|
static ConnectionPolicy |
ConnectionPolicy.getDefaultPolicy()
Gets the default connection policy.
|
ConnectionPolicy |
ConnectionPolicy.setConnectionMode(ConnectionMode connectionMode)
Sets the connection mode used in the client.
|
ConnectionPolicy |
ConnectionPolicy.setEnableEndpointDiscovery(boolean enableEndpointDiscovery)
Sets the flag to enable endpoint discovery for geo-replicated database accounts.
|
ConnectionPolicy |
ConnectionPolicy.setEnableReadRequestsFallback(Boolean enableReadRequestsFallback)
Sets whether to allow for reads to go to multiple regions configured on an account of Azure Cosmos DB service.
|
ConnectionPolicy |
ConnectionPolicy.setIdleConnectionTimeoutInMillis(int idleConnectionTimeoutInMillis)
sets the value of the timeout for an idle connection.
|
ConnectionPolicy |
ConnectionPolicy.setMaxPoolSize(int maxPoolSize)
Sets the value of the connection pool size, the default
is 1000.
|
ConnectionPolicy |
ConnectionPolicy.setPreferredLocations(List<String> preferredLocations)
Sets the preferred locations for geo-replicated database accounts.
|
ConnectionPolicy |
ConnectionPolicy.setProxy(String proxyHost,
int proxyPort)
This will create the InetSocketAddress for proxy server,
all the requests to cosmoDB will route from this address.
|
ConnectionPolicy |
ConnectionPolicy.setRequestTimeoutInMillis(int requestTimeoutInMillis)
Sets the request timeout (time to wait for response from network peer) in
milliseconds.
|
ConnectionPolicy |
ConnectionPolicy.setRetryOptions(RetryOptions retryOptions)
Sets the retry policy options associated with the DocumentClient instance.
|
ConnectionPolicy |
ConnectionPolicy.setUserAgentSuffix(String userAgentSuffix)
sets the value of the user-agent suffix.
|
ConnectionPolicy |
ConnectionPolicy.setUsingMultipleWriteLocations(boolean usingMultipleWriteLocations)
Sets the flag to enable writes on any locations (regions) for geo-replicated database accounts in the Azure
Cosmos DB service.
|
Modifier and Type | Method and Description |
---|---|
CosmosClientBuilder |
CosmosClientBuilder.setConnectionPolicy(ConnectionPolicy connectionPolicy)
Sets the
ConnectionPolicy to be used |
Copyright © 2020 Microsoft Corporation. All rights reserved.