Package com.azure.spring.data.cosmos
Class CosmosFactory
java.lang.Object
com.azure.spring.data.cosmos.CosmosFactory
Factory class for CosmosDb to create client
-
Constructor Summary
ConstructorDescriptionCosmosFactory
(CosmosAsyncClient cosmosAsyncClient, String databaseName) Validate config and initialization -
Method Summary
Modifier and TypeMethodDescriptionstatic CosmosAsyncClient
createCosmosAsyncClient
(CosmosClientBuilder cosmosClientBuilder) Create Cosmos Async ClientTo create a CosmosAsyncClientGet Cosmos Database Name
-
Constructor Details
-
CosmosFactory
Validate config and initialization- Parameters:
cosmosAsyncClient
- cosmosAsyncClientdatabaseName
- databaseName
-
-
Method Details
-
getCosmosAsyncClient
To create a CosmosAsyncClient- Returns:
- CosmosAsyncClient
-
getDatabaseName
Get Cosmos Database Name- Returns:
- Cosmos Database Name
-
createCosmosAsyncClient
Create Cosmos Async Client- Parameters:
cosmosClientBuilder
- CosmosClientBuilder- Returns:
- CosmosAsyncClient
-