Package com.azure.data.cosmos
Enum ConflictResolutionMode
- java.lang.Object
-
- java.lang.Enum<ConflictResolutionMode>
-
- com.azure.data.cosmos.ConflictResolutionMode
-
- All Implemented Interfaces:
Serializable
,Comparable<ConflictResolutionMode>
public enum ConflictResolutionMode extends Enum<ConflictResolutionMode>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CUSTOM
CUSTOM conflict resolution mode Setting the ConflictResolutionMode to "CUSTOM" indicates that conflict resolution is custom handled by a user.INVALID
INVALID or unknown mode.LAST_WRITER_WINS
Last writer wins conflict resolution mode Setting the ConflictResolutionMode to "LAST_WRITER_WINS" indicates that conflict resolution should be done by inspecting a field in the conflicting documents and picking the document which has the higher value in that path.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
toString()
static ConflictResolutionMode
valueOf(String name)
Returns the enum constant of this type with the specified name.static ConflictResolutionMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LAST_WRITER_WINS
public static final ConflictResolutionMode LAST_WRITER_WINS
Last writer wins conflict resolution mode Setting the ConflictResolutionMode to "LAST_WRITER_WINS" indicates that conflict resolution should be done by inspecting a field in the conflicting documents and picking the document which has the higher value in that path. SeeConflictResolutionPolicy.conflictResolutionPath()
for details on how to specify the path to be checked for conflict resolution. Also note that Deletes win.
-
CUSTOM
public static final ConflictResolutionMode CUSTOM
CUSTOM conflict resolution mode Setting the ConflictResolutionMode to "CUSTOM" indicates that conflict resolution is custom handled by a user. The user could elect to register a user specifiedStoredProcedure
for handling conflicting resources. Should the user not register a user specified StoredProcedure, conflicts will default to being made available asConflict
resources, which the user can inspect and manually resolve. SeeConflictResolutionPolicy.conflictResolutionProcedure()
for details on how to specify the stored procedure to run for conflict resolution.
-
INVALID
public static final ConflictResolutionMode INVALID
INVALID or unknown mode.
-
-
Method Detail
-
values
public static ConflictResolutionMode[] 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 (ConflictResolutionMode c : ConflictResolutionMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ConflictResolutionMode 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<ConflictResolutionMode>
-
-