Package com.azure.data.cosmos
Enum IndexingMode
- java.lang.Object
-
- java.lang.Enum<IndexingMode>
-
- com.azure.data.cosmos.IndexingMode
-
- All Implemented Interfaces:
Serializable
,Comparable<IndexingMode>
public enum IndexingMode extends Enum<IndexingMode>
Specifies the supported indexing modes in the Azure Cosmos DB database service.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CONSISTENT
Index is updated synchronously with a create or update operation.LAZY
Index is updated asynchronously with respect to a create or update operation.NONE
No index is provided.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
toString()
static IndexingMode
valueOf(String name)
Returns the enum constant of this type with the specified name.static IndexingMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CONSISTENT
public static final IndexingMode CONSISTENT
Index is updated synchronously with a create or update operation.With consistent indexing, query behavior is the same as the default consistency level for the collection. The index is always kept up to date with the data.
-
LAZY
public static final IndexingMode LAZY
Index is updated asynchronously with respect to a create or update operation.With lazy indexing, queries are eventually consistent. The index is updated when the collection is idle.
-
NONE
public static final IndexingMode NONE
No index is provided.Setting IndexingMode to "NONE" drops the index. Use this if you don't want to maintain the index for a document collection, to save the storage cost or improve the write throughput. Your queries will degenerate to scans of the entire collection.
-
-
Method Detail
-
values
public static IndexingMode[] 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 (IndexingMode c : IndexingMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static IndexingMode 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
-
toString
public String toString()
- Overrides:
toString
in classEnum<IndexingMode>
-
-