Package com.azure.cosmos.models
Class CosmosBatchResponse
java.lang.Object
com.azure.cosmos.models.CosmosBatchResponse
Response of a
CosmosBatch
request.-
Method Summary
Modifier and TypeMethodDescriptionGets the activity ID that identifies the server request made to execute the batch.Gets the diagnostics information for the current request to Azure Cosmos DB service.Gets the end-to-end request latency for the current request to Azure Cosmos DB service.Gets the reason for the failure of the batch request, if any, ornull
.double
Gets the request charge as request units (RU) consumed by the batch operation.Gets the headers associated with the response.int
Get the length of the response of a batch operation change it in the down path.Get all the results of the operations in a batch in an unmodifiable instance so no one can change it in the down path.Gets the amount of time to wait before retrying this or any other request due to throttling.Gets the token used for managing client's consistency requirements.int
Gets the HTTP status code associated with the response.int
Gets the HTTP sub status code associated with the response.boolean
Returns a value indicating whether the batch was successfully processed.int
size()
Gets the number of operation results.
-
Method Details
-
getDiagnostics
Gets the diagnostics information for the current request to Azure Cosmos DB service.- Returns:
- diagnostics information for the current request to Azure Cosmos DB service.
-
size
public int size()Gets the number of operation results.- Returns:
- the number of operations results in this response.
-
isSuccessStatusCode
public boolean isSuccessStatusCode()Returns a value indicating whether the batch was successfully processed.- Returns:
- a value indicating whether the batch was successfully processed.
-
getActivityId
Gets the activity ID that identifies the server request made to execute the batch.- Returns:
- the activity ID that identifies the server request made to execute the batch.
-
getErrorMessage
Gets the reason for the failure of the batch request, if any, ornull
.- Returns:
- the reason for the failure of the batch request, if any, or
null
.
-
getRequestCharge
public double getRequestCharge()Gets the request charge as request units (RU) consumed by the batch 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.
-
getStatusCode
public int getStatusCode()Gets the HTTP status code associated with the response.- Returns:
- the status code.
-
getSessionToken
Gets the token used for managing client's consistency requirements.- Returns:
- the session token.
-
getResponseHeaders
Gets the headers associated with the response.- Returns:
- the response headers.
-
getRetryAfterDuration
Gets the amount of time to wait before retrying this or any other request due to throttling.- Returns:
- the amount of time to wait before retrying this or any other request due to throttling.
-
getSubStatusCode
public int getSubStatusCode()Gets the HTTP sub status code associated with the response.- Returns:
- the sub status code.
-
getResults
Get all the results of the operations in a batch in an unmodifiable instance so no one can change it in the down path.- Returns:
- Results of operations in a batch.
-
getResponseLength
public int getResponseLength()Get the length of the response of a batch operation change it in the down path.- Returns:
- length of the response.
-
getDuration
Gets the end-to-end request latency for the current request to Azure Cosmos DB service.- Returns:
- end-to-end request latency for the current request to Azure Cosmos DB service.
-