public enum ConnectionMode extends Enum<ConnectionMode>
Direct and Gateway connectivity modes are supported. Gateway is the default. Refer to <see>http://azure.microsoft.com/documentation/articles/documentdb- interactions-with-resources/#connectivity-options</see> for additional details.
Enum Constant and Description |
---|
DirectHttps
Specifies that requests to server resources are made directly to the data nodes through HTTPS.
|
Gateway
Specifies that requests to server resources are made through a gateway proxy using HTTPS.
|
Modifier and Type | Method and Description |
---|---|
static ConnectionMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ConnectionMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ConnectionMode Gateway
In Gateway mode, all requests are made through a gateway proxy.
public static final ConnectionMode DirectHttps
In DirectHttps mode, all requests to server resources within a collection, such as documents, stored procedures and user-defined functions, etc., are made directly to the data nodes within the target Cosmos DB cluster using the HTTPS transport protocol. DirectHttps is less efficient than Direct but more efficient than Gateway.
Certain operations on account or database level resources, such as databases, collections and users, etc., are always routed through the gateway using HTTPS.
public static ConnectionMode[] values()
for (ConnectionMode c : ConnectionMode.values()) System.out.println(c);
public static ConnectionMode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2018. All rights reserved.