Package com.azure.cosmos.models
Enum ConflictResolutionMode
- All Implemented Interfaces:
Serializable
,Comparable<ConflictResolutionMode>
,java.lang.constant.Constable
The enum Conflict resolution mode.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionCUSTOM conflict resolution modeINVALID or unknown mode.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 items and picking the item which has the higher value in that path. -
Method Summary
Modifier and TypeMethodDescriptiontoString()
static ConflictResolutionMode
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 Details
-
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 items and picking the item which has the higher value in that path. SeeConflictResolutionPolicy.getConflictResolutionPath()
for details on how to specify the path -
CUSTOM
CUSTOM conflict resolution modeSetting the ConflictResolutionMode to "CUSTOM" indicates that conflict resolution is custom handled by a user. The user could elect to register a user specified
StoredProcedure
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.getConflictResolutionProcedure()
for details on how to specify the stored procedure to run for conflict resolution. -
INVALID
INVALID or unknown mode.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
- Overrides:
toString
in classEnum<ConflictResolutionMode>
-