public class CosmosUtils extends Object
| Constructor and Description |
|---|
CosmosUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T> void |
fillAndProcessResponseDiagnostics(ResponseDiagnosticsProcessor responseDiagnosticsProcessor,
CosmosDiagnostics cosmosDiagnostics,
FeedResponse<T> feedResponse)
Generate ResponseDiagnostics with cosmos and feed response diagnostics
|
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.
|
public static <T> void fillAndProcessResponseDiagnostics(ResponseDiagnosticsProcessor responseDiagnosticsProcessor, CosmosDiagnostics cosmosDiagnostics, FeedResponse<T> feedResponse)
T - type of cosmosResponseresponseDiagnosticsProcessor - collect Response Diagnostics from API responses and then set in ResponseDiagnostics object.cosmosDiagnostics - response from cosmosfeedResponse - response from feedpublic static String getStringIDValue(Object idValue)
idValue - id value to findIllegalArgumentException - thrown if id value fail the validation.IllegalQueryException - thrown if id value fail the validation.Visit the Azure for Java Developers site for more Java documentation, including quick starts, tutorials, and code samples.