Package com.azure.data.cosmos
Enum ConnectionMode
- java.lang.Object
-
- java.lang.Enum<ConnectionMode>
-
- com.azure.data.cosmos.ConnectionMode
-
- All Implemented Interfaces:
Serializable
,Comparable<ConnectionMode>
public enum ConnectionMode extends Enum<ConnectionMode>
Represents the connection mode to be used by the client in the Azure Cosmos DB database service.DIRECT and GATEWAY connectivity modes are supported. DIRECT is the default. Refer to <see>http://azure.microsoft.com/documentation/articles/documentdb- interactions-with-resources/#connectivity-options</see> for additional details.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Enum Constant Detail
-
GATEWAY
public static final ConnectionMode GATEWAY
Specifies that requests to server resources are made through a gateway proxy using HTTPS.In GATEWAY mode, all requests are made through a gateway proxy.
-
DIRECT
public static final ConnectionMode DIRECT
Specifies that requests to server resources are made directly to the data nodes.In DIRECT 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 either the HTTPS or TCP/SSL transport protocol.
Certain operations on account or database level resources, such as databases, collections and users, etc., are always routed through the gateway using HTTPS.
-
-
Method Detail
-
values
public static ConnectionMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ConnectionMode c : ConnectionMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ConnectionMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-