Skip to content

Commit 7890dc9

Browse files
authored
Merge pull request #114007 from SnehaGunda/tabbedconceptual
Adding tabbed conceptuals
2 parents 2e2ab69 + ffa9d50 commit 7890dc9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

articles/cosmos-db/create-sql-api-java.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ git clone https://github.com/Azure-Samples/azure-cosmos-java-getting-started.git
7676
This step is optional. If you're interested in learning how the database resources are created in the code, you can review the following snippets. Otherwise, you can skip ahead to [Run the app
7777
](#run-the-app).
7878

79+
80+
# [Sync API](#tab/sync)
81+
7982
### Managing database resources using the synchronous (sync) API
8083

8184
* `CosmosClient` initialization. The `CosmosClient` provides client-side logical representation for the Azure Cosmos database service. This client is used to configure and execute requests against the service.
@@ -102,6 +105,8 @@ This step is optional. If you're interested in learning how the database resourc
102105

103106
[!code-java[](~/azure-cosmosdb-java-v4-getting-started/src/main/java/com/azure/cosmos/sample/sync/SyncMain.java?name=QueryItems)]
104107

108+
# [Async API](#tab/async)
109+
105110
### Managing database resources using the asynchronous (async) API
106111

107112
* Async API calls return immediately, without waiting for a response from the server. In light of this, the following code snippets show proper design patterns for accomplishing all of the preceding management tasks using async API.
@@ -130,6 +135,8 @@ This step is optional. If you're interested in learning how the database resourc
130135

131136
[!code-java[](~/azure-cosmosdb-java-v4-getting-started/src/main/java/com/azure/cosmos/sample/async/AsyncMain.java?name=QueryItems)]
132137

138+
---
139+
133140
## Run the app
134141

135142
Now go back to the Azure portal to get your connection string information and launch the app with your endpoint information. This enables your app to communicate with your hosted database.

0 commit comments

Comments
 (0)