Partager via


ConflictResolutionPolicy Class

  • java.lang.Object
    • com.azure.resourcemanager.cosmos.models.ConflictResolutionPolicy

Implements

public final class ConflictResolutionPolicy
implements JsonSerializable<ConflictResolutionPolicy>

The conflict resolution policy for the container.

Constructor Summary

Constructor Description
ConflictResolutionPolicy()

Creates an instance of ConflictResolutionPolicy class.

Method Summary

Modifier and Type Method and Description
String conflictResolutionPath()

Get the conflictResolutionPath property: The conflict resolution path in the case of LastWriterWins mode.

String conflictResolutionProcedure()

Get the conflictResolutionProcedure property: The procedure to resolve conflicts in the case of custom mode.

static ConflictResolutionPolicy fromJson(JsonReader jsonReader)

Reads an instance of ConflictResolutionPolicy from the JsonReader.

ConflictResolutionMode mode()

Get the mode property: Indicates the conflict resolution mode.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ConflictResolutionPolicy withConflictResolutionPath(String conflictResolutionPath)

Set the conflictResolutionPath property: The conflict resolution path in the case of LastWriterWins mode.

ConflictResolutionPolicy withConflictResolutionProcedure(String conflictResolutionProcedure)

Set the conflictResolutionProcedure property: The procedure to resolve conflicts in the case of custom mode.

ConflictResolutionPolicy withMode(ConflictResolutionMode mode)

Set the mode property: Indicates the conflict resolution mode.

Methods inherited from java.lang.Object

Constructor Details

ConflictResolutionPolicy

public ConflictResolutionPolicy()

Creates an instance of ConflictResolutionPolicy class.

Method Details

conflictResolutionPath

public String conflictResolutionPath()

Get the conflictResolutionPath property: The conflict resolution path in the case of LastWriterWins mode.

Returns:

the conflictResolutionPath value.

conflictResolutionProcedure

public String conflictResolutionProcedure()

Get the conflictResolutionProcedure property: The procedure to resolve conflicts in the case of custom mode.

Returns:

the conflictResolutionProcedure value.

fromJson

public static ConflictResolutionPolicy fromJson(JsonReader jsonReader)

Reads an instance of ConflictResolutionPolicy from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ConflictResolutionPolicy if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the ConflictResolutionPolicy.

mode

public ConflictResolutionMode mode()

Get the mode property: Indicates the conflict resolution mode.

Returns:

the mode value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withConflictResolutionPath

public ConflictResolutionPolicy withConflictResolutionPath(String conflictResolutionPath)

Set the conflictResolutionPath property: The conflict resolution path in the case of LastWriterWins mode.

Parameters:

conflictResolutionPath - the conflictResolutionPath value to set.

Returns:

the ConflictResolutionPolicy object itself.

withConflictResolutionProcedure

public ConflictResolutionPolicy withConflictResolutionProcedure(String conflictResolutionProcedure)

Set the conflictResolutionProcedure property: The procedure to resolve conflicts in the case of custom mode.

Parameters:

conflictResolutionProcedure - the conflictResolutionProcedure value to set.

Returns:

the ConflictResolutionPolicy object itself.

withMode

public ConflictResolutionPolicy withMode(ConflictResolutionMode mode)

Set the mode property: Indicates the conflict resolution mode.

Parameters:

mode - the mode value to set.

Returns:

the ConflictResolutionPolicy object itself.

Applies to