Sdílet prostřednictvím


Conflict Class

public class Conflict extends Resource

Represents a conflict in the version of a particular resource in the Azure Cosmos DB database service.

During rare failure scenarios, conflicts are generated for the documents in transit. Clients can inspect the respective conflict instances for resources and operations in conflict.

Constructor Summary

Constructor Description
Conflict()

Initialize a conflict object.

Conflict(String jsonString)

Initialize a conflict object from json string.

Method Summary

Modifier and Type Method and Description
String getOperationKind()

Gets the operation kind.

String getResouceType()

Gets the type of the conflicting resource.

<T extends Resource> T getResource(Class<T> klass)

Gets the conflicting resource in the Azure Cosmos DB service.

String getSourceResourceId()

Gets the resource ID for the conflict in the Azure Cosmos DB service.

Inherited Members

Constructor Details

Conflict

public Conflict()

Initialize a conflict object.

Conflict

public Conflict(String jsonString)

Initialize a conflict object from json string.

Parameters:

jsonString - the json string that represents the conflict.

Method Details

getOperationKind

public String getOperationKind()

Gets the operation kind.

Returns:

the operation kind.

getResouceType

public String getResouceType()

Gets the type of the conflicting resource.

Returns:

the resource type.

getResource

public T getResource(Class klass)

Gets the conflicting resource in the Azure Cosmos DB service.

Parameters:

klass - The returned type of conflicting resource.

Returns:

The conflicting resource.

getSourceResourceId

public String getSourceResourceId()

Gets the resource ID for the conflict in the Azure Cosmos DB service.

Returns:

resource Id for the conflict.

Applies to