Package | Description |
---|---|
com.azure.cosmos |
This package provides interfaces for interacting with Azure Cosmos DB.
|
Modifier and Type | Method and Description |
---|---|
static DirectConnectionConfig |
DirectConnectionConfig.getDefaultConfig()
Gets the default DIRECT connection configuration.
|
DirectConnectionConfig |
DirectConnectionConfig.setConnectionEndpointRediscoveryEnabled(boolean connectionEndpointRediscoveryEnabled)
Sets a value indicating whether Direct TCP connection endpoint rediscovery should be enabled.
|
DirectConnectionConfig |
DirectConnectionConfig.setConnectTimeout(Duration connectTimeout)
Sets the connect timeout for direct client,
represents timeout for establishing connections with an endpoint.
|
DirectConnectionConfig |
DirectConnectionConfig.setIdleConnectionTimeout(Duration idleConnectionTimeout)
Sets the idle connection timeout
Default value is
Duration.ZERO
Direct client doesn't close a single connection to an endpoint
by default unless specified. |
DirectConnectionConfig |
DirectConnectionConfig.setIdleEndpointTimeout(Duration idleEndpointTimeout)
Sets the idle endpoint timeout
Default value is 1 hour.
|
DirectConnectionConfig |
DirectConnectionConfig.setMaxConnectionsPerEndpoint(int maxConnectionsPerEndpoint)
Sets the max connections per endpoint
This represents the size of connection pool for a specific endpoint
Default value is 130
|
DirectConnectionConfig |
DirectConnectionConfig.setMaxRequestsPerConnection(int maxRequestsPerConnection)
Sets the max requests per connection
This represents the number of requests that will be queued
on a single connection for a specific endpoint
Default value is 30
|
Modifier and Type | Method and Description |
---|---|
CosmosClientBuilder |
CosmosClientBuilder.directMode(DirectConnectionConfig directConnectionConfig)
Sets the DIRECT connection configuration to be used.
|
CosmosClientBuilder |
CosmosClientBuilder.directMode(DirectConnectionConfig directConnectionConfig,
GatewayConnectionConfig gatewayConnectionConfig)
Sets the DIRECT connection configuration to be used.
|
Copyright © 2021 Microsoft Corporation. All rights reserved.