use of com.azure.cosmos.examples.common.CustomPOJO in project azure-cosmos-java-sql-api-samples by Azure-Samples.
the class SampleDocumentationSnippets method PerformanceTipsJavaSDKv4RequestChargeSpecAsync.
/**
* https://docs.microsoft.com/en-us/azure/cosmos-db/performance-tips-java-sdk-v4-sql
* Performance tips - get request charge
*/
/**
* Performance tips - get request charge
*/
public static void PerformanceTipsJavaSDKv4RequestChargeSpecAsync() {
CosmosContainer syncContainer = null;
CustomPOJO item = null;
// <PerformanceRequestChargeSync>
CosmosItemResponse<CustomPOJO> response = syncContainer.createItem(item);
response.getRequestCharge();
// </PerformanceRequestChargeSync>
}
use of com.azure.cosmos.examples.common.CustomPOJO in project azure-cosmos-java-sql-api-samples by Azure-Samples.
the class SampleDocumentationSnippets method PerformanceTipsJavaSDKv4NoPKSpecSync.
/**
* https://docs.microsoft.com/en-us/azure/cosmos-db/performance-tips-java-sdk-v4-sql
* Performance tips - not specifying partition key in point-writes
*/
/**
* Performance tips - not specifying partition key in point-writes
*/
public static void PerformanceTipsJavaSDKv4NoPKSpecSync() {
CosmosContainer syncContainer = null;
CustomPOJO item = null;
String pk = "pk_value";
// <PerformanceNoPKSync>
syncContainer.createItem(item, new PartitionKey(pk), new CosmosItemRequestOptions());
// </PerformanceNoPKSync>
}
Aggregations