Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the MIT License.
package com.azure.cosmos;

import com.azure.cosmos.implementation.TestConfigurations;
import com.fasterxml.jackson.databind.JsonNode;

/**
Expand All @@ -11,7 +12,12 @@ public class ChangeFeedProcessorCodeSnippet {

public void changeFeedProcessorBuilderCodeSnippet() {
String hostName = "test-host-name";
CosmosAsyncClient cosmosAsyncClient = new CosmosClientBuilder().buildAsyncClient();
CosmosAsyncClient cosmosAsyncClient = new CosmosClientBuilder()
.endpoint(TestConfigurations.HOST)
.key(TestConfigurations.MASTER_KEY)
.contentResponseOnWriteEnabled(true)
.consistencyLevel(ConsistencyLevel.SESSION)
.buildAsyncClient();
CosmosAsyncDatabase cosmosAsyncDatabase = cosmosAsyncClient.getDatabase("testDb");
CosmosAsyncContainer feedContainer = cosmosAsyncDatabase.getContainer("feedContainer");
CosmosAsyncContainer leaseContainer = cosmosAsyncDatabase.getContainer("leaseContainer");
Expand All @@ -31,7 +37,12 @@ public void changeFeedProcessorBuilderCodeSnippet() {

public void handleChangesCodeSnippet() {
String hostName = "test-host-name";
CosmosAsyncClient cosmosAsyncClient = new CosmosClientBuilder().buildAsyncClient();
CosmosAsyncClient cosmosAsyncClient = new CosmosClientBuilder()
.endpoint(TestConfigurations.HOST)
.key(TestConfigurations.MASTER_KEY)
.contentResponseOnWriteEnabled(true)
.consistencyLevel(ConsistencyLevel.SESSION)
.buildAsyncClient();
CosmosAsyncDatabase cosmosAsyncDatabase = cosmosAsyncClient.getDatabase("testDb");
CosmosAsyncContainer feedContainer = cosmosAsyncDatabase.getContainer("feedContainer");
CosmosAsyncContainer leaseContainer = cosmosAsyncDatabase.getContainer("leaseContainer");
Expand Down