CosmosResponse<T> Class
- java.
lang. Object - com.
azure. cosmos. models. CosmosResponse<T>
- com.
Type Parameters
- T
the type of resource
public class CosmosResponse
The cosmos response
Method Summary
Modifier and Type | Method and Description |
---|---|
String |
getActivityId()
Gets the Activity ID for the request. |
String |
getCurrentResourceQuotaUsage()
Gets the current size of this entity (in megabytes (MB) for server resources and in count for master resources) |
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 |
getMaxResourceQuota()
Gets the maximum size limit for this entity (in megabytes (MB) for server resources and in count for master resources). |
T |
getProperties()
Gets properties. |
double |
getRequestCharge()
Gets the request charge as request units (RU) consumed by the operation. |
Map<String,String> |
getResponseHeaders()
Gets the headers associated with the response. |
String |
getSessionToken()
Gets the token used for managing client's consistency requirements. |
int |
getStatusCode()
Gets the HTTP status code associated with the response. |
Methods inherited from java.lang.Object
Method Details
getActivityId
public String getActivityId()
Gets the Activity ID for the request.
Returns:
getCurrentResourceQuotaUsage
public String getCurrentResourceQuotaUsage()
Gets the current size of this entity (in megabytes (MB) for server resources and in count for master resources)
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:
getMaxResourceQuota
public String getMaxResourceQuota()
Gets the maximum size limit for this entity (in megabytes (MB) for server resources and in count for master resources).
For CosmosContainer, users will need to set setQuotaInfoEnabled(boolean quotaInfoEnabled) to true to get the quota information.
Returns:
getProperties
public T getProperties()
Gets properties.
Returns:
getRequestCharge
public double getRequestCharge()
Gets the request charge as request units (RU) consumed by the 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:
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: