你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

CosmosBatchOperationResult Class

  • java.lang.Object
    • com.azure.cosmos.models.CosmosBatchOperationResult

public final class CosmosBatchOperationResult

Represents a result for a specific operation that was part of a CosmosBatch request.

Method Summary

Modifier and Type Method and Description
T getItem(Class<T> type)

Gets the item associated with the current result.

String getETag()

Gets the entity tag associated with the current item.

CosmosItemOperation getOperation()

Gets the original operation for this result.

double getRequestCharge()

Gets the request charge as request units (RU) consumed by the current operation.

Duration getRetryAfterDuration()

Gets retry after.

int getStatusCode()

Gets the HTTP status code associated with the current result.

int getSubStatusCode()

Gets sub status code associated with the current result.

boolean isSuccessStatusCode()

Gets a value indicating whether the current operation completed successfully.

Methods inherited from java.lang.Object

Method Details

getItem

public T getItem(Class type)

Gets the item associated with the current result.

Parameters:

type - class type for which deserialization is needed.

Returns:

item associated with the current result.

getETag

public String getETag()

Gets the entity tag associated with the current item. ETags are used for concurrency checking when updating resources.

Returns:

Entity tag associated with the current item.

getOperation

public CosmosItemOperation getOperation()

Gets the original operation for this result.

Returns:

the CosmosItemOperation.

getRequestCharge

public double getRequestCharge()

Gets the request charge as request units (RU) consumed by the current operation.

For more information about the RU and factors that can impact the effective charges please visit Request Units in Azure Cosmos DB

Returns:

the request charge.

getRetryAfterDuration

public Duration getRetryAfterDuration()

Gets retry after.

Returns:

the retry after

getStatusCode

public int getStatusCode()

Gets the HTTP status code associated with the current result.

Returns:

the status code.

getSubStatusCode

public int getSubStatusCode()

Gets sub status code associated with the current result.

Returns:

the sub status code

isSuccessStatusCode

public boolean isSuccessStatusCode()

Gets a value indicating whether the current operation completed successfully.

Returns:

true if the current operation completed successfully; false otherwise.

Applies to