你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
CosmosBatchResponse Class
- java.
lang. Object - com.
azure. cosmos. models. CosmosBatchResponse
- com.
public final class CosmosBatchResponse
Response of a CosmosBatch request.
Method Summary
Modifier and Type | Method and Description |
---|---|
String |
getActivityId()
Gets the activity ID that identifies the server request made to execute the batch. |
Cosmos |
getDiagnostics()
Gets the diagnostics information for the current request to Azure Cosmos DB service. |
Duration |
getDuration()
Gets the end-to-end request latency for the current request to Azure Cosmos DB service. |
String |
getErrorMessage()
Gets the reason for the failure of the batch request, if any, or |
double |
getRequestCharge()
Gets the request charge as request units (RU) consumed by the batch operation. |
Map<String,String> |
getResponseHeaders()
Gets the headers associated with the response. |
int |
getResponseLength()
Get the length of the response of a batch operation change it in the down path. |
List<Cosmos |
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. |
Duration |
getRetryAfterDuration()
Gets the amount of time to wait before retrying this or any other request due to throttling. |
String |
getSessionToken()
Gets the token used for managing client's consistency requirements. |
int |
getStatusCode()
Gets the HTTP status code associated with the response. |
int |
getSubStatusCode()
Gets the HTTP sub status code associated with the response. |
boolean |
isSuccessStatusCode()
Returns a value indicating whether the batch was successfully processed. |
int |
size()
Gets the number of operation results. |
Methods inherited from java.lang.Object
Method Details
getActivityId
public String getActivityId()
Gets the activity ID that identifies the server request made to execute the batch.
Returns:
getDiagnostics
public CosmosDiagnostics getDiagnostics()
Gets the diagnostics information for the current request to Azure Cosmos DB service.
Returns:
getDuration
public Duration getDuration()
Gets the end-to-end request latency for the current request to Azure Cosmos DB service.
Returns:
getErrorMessage
public String getErrorMessage()
Gets the reason for the failure of the batch request, if any, or null
.
Returns:
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:
getResponseHeaders
public Map
Gets the headers associated with the response.
Returns:
getResponseLength
public int getResponseLength()
Get the length of the response of a batch operation change it in the down path.
Returns:
getResults
public List
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:
getRetryAfterDuration
public Duration getRetryAfterDuration()
Gets the amount of time to wait before retrying this or any other request due to throttling.
Returns:
getSessionToken
public String getSessionToken()
Gets the token used for managing client's consistency requirements.
Returns:
getStatusCode
public int getStatusCode()
Gets the HTTP status code associated with the response.
Returns:
getSubStatusCode
public int getSubStatusCode()
Gets the HTTP sub status code associated with the response.
Returns:
isSuccessStatusCode
public boolean isSuccessStatusCode()
Returns a value indicating whether the batch was successfully processed.
Returns:
size
public int size()
Gets the number of operation results.
Returns: