CosmosUtils Class
- java.
lang. Object - com.
azure. spring. data. cosmos. common. CosmosUtils
- com.
public class CosmosUtils
Util class to fill and process response diagnostics
Constructor Summary
| Constructor | Description |
|---|---|
| CosmosUtils() |
Creates an instance of CosmosUtils |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| static void |
fillAndProcessCosmosExceptionDiagnostics(ResponseDiagnosticsProcessor responseDiagnosticsProcessor, CosmosException cosmosException)
Generate Response |
| static void |
fillAndProcessResponseDiagnostics(ResponseDiagnosticsProcessor responseDiagnosticsProcessor, CosmosDiagnostics cosmosDiagnostics, FeedResponse<T> feedResponse)
Generate Response |
| static String |
getStringIDValue(Object idValue)
ID value should be string value, real id type will be String, Integer, Long, all of these must be converted to String type. |
Methods inherited from java.lang.Object
Constructor Details
CosmosUtils
public CosmosUtils()
Creates an instance of CosmosUtils
Method Details
fillAndProcessCosmosExceptionDiagnostics
public static void fillAndProcessCosmosExceptionDiagnostics(ResponseDiagnosticsProcessor responseDiagnosticsProcessor, CosmosException cosmosException)
Generate ResponseDiagnostics with CosmosException diagnostics
Parameters:
fillAndProcessResponseDiagnostics
public static void <T>fillAndProcessResponseDiagnostics(ResponseDiagnosticsProcessor responseDiagnosticsProcessor, CosmosDiagnostics cosmosDiagnostics, FeedResponse<T> feedResponse)
Generate ResponseDiagnostics with cosmos and feed response diagnostics
Parameters:
getStringIDValue
public static String getStringIDValue(Object idValue)
ID value should be string value, real id type will be String, Integer, Long, all of these must be converted to String type.
Parameters:
Returns: