public class CosmosClientProxy extends Object implements Closeable
CosmosClient.
It is required in order to stub and do not depend on implementation
| Constructor and Description |
|---|
CosmosClientProxy() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close this
CosmosClient instance. |
com.azure.cosmos.models.CosmosDatabaseResponse |
createDatabase(com.azure.cosmos.models.CosmosDatabaseProperties databaseProperties)
Creates a Cosmos database.
|
com.azure.cosmos.models.CosmosDatabaseResponse |
createDatabase(com.azure.cosmos.models.CosmosDatabaseProperties databaseProperties,
com.azure.cosmos.models.CosmosDatabaseRequestOptions options)
Creates a database.
|
com.azure.cosmos.models.CosmosDatabaseResponse |
createDatabase(com.azure.cosmos.models.CosmosDatabaseProperties databaseProperties,
com.azure.cosmos.models.ThroughputProperties throughputProperties)
Creates a Cosmos database.
|
com.azure.cosmos.models.CosmosDatabaseResponse |
createDatabase(com.azure.cosmos.models.CosmosDatabaseProperties databaseProperties,
com.azure.cosmos.models.ThroughputProperties throughputProperties,
com.azure.cosmos.models.CosmosDatabaseRequestOptions options)
Creates a Cosmos database.
|
com.azure.cosmos.models.CosmosDatabaseResponse |
createDatabase(String id)
Creates a Cosmos database.
|
com.azure.cosmos.models.CosmosDatabaseResponse |
createDatabase(String id,
com.azure.cosmos.models.ThroughputProperties throughputProperties)
Creates a Cosmos database.
|
com.azure.cosmos.models.CosmosDatabaseResponse |
createDatabaseIfNotExists(String id)
Create a Cosmos database if it does not already exist on the service.
|
com.azure.cosmos.models.CosmosDatabaseResponse |
createDatabaseIfNotExists(String id,
com.azure.cosmos.models.ThroughputProperties throughputProperties)
Create a Cosmos database if it does not already exist on the service.
|
com.azure.cosmos.CosmosDatabase |
getDatabase(String id)
Gets the Cosmos database client.
|
com.azure.cosmos.util.CosmosPagedIterable<com.azure.cosmos.models.CosmosDatabaseProperties> |
queryDatabases(com.azure.cosmos.models.SqlQuerySpec querySpec,
com.azure.cosmos.models.CosmosQueryRequestOptions options)
Query a Cosmos database.
|
com.azure.cosmos.util.CosmosPagedIterable<com.azure.cosmos.models.CosmosDatabaseProperties> |
queryDatabases(String query,
com.azure.cosmos.models.CosmosQueryRequestOptions options)
Query a Cosmos database.
|
com.azure.cosmos.util.CosmosPagedIterable<com.azure.cosmos.models.CosmosDatabaseProperties> |
readAllDatabases()
Reads all Cosmos databases.
|
public com.azure.cosmos.models.CosmosDatabaseResponse createDatabaseIfNotExists(String id, com.azure.cosmos.models.ThroughputProperties throughputProperties)
The throughputProperties will only be used if the specified database does not exist and therefore a new database will be created with throughputProperties.
id - the id of the database.throughputProperties - the throughputProperties.CosmosDatabaseResponse with the created database.public com.azure.cosmos.models.CosmosDatabaseResponse createDatabaseIfNotExists(String id)
id - the id of the database.CosmosDatabaseResponse with the created database.public com.azure.cosmos.models.CosmosDatabaseResponse createDatabase(com.azure.cosmos.models.CosmosDatabaseProperties databaseProperties,
com.azure.cosmos.models.CosmosDatabaseRequestOptions options)
databaseProperties - CosmosDatabaseProperties the database properties.options - the request options.CosmosDatabaseResponse with the created database.public com.azure.cosmos.models.CosmosDatabaseResponse createDatabase(com.azure.cosmos.models.CosmosDatabaseProperties databaseProperties)
databaseProperties - CosmosDatabaseProperties the database properties.CosmosDatabaseResponse with the created database.public com.azure.cosmos.models.CosmosDatabaseResponse createDatabase(String id)
id - the id of the database.CosmosDatabaseResponse with the created database.public com.azure.cosmos.models.CosmosDatabaseResponse createDatabase(com.azure.cosmos.models.CosmosDatabaseProperties databaseProperties,
com.azure.cosmos.models.ThroughputProperties throughputProperties,
com.azure.cosmos.models.CosmosDatabaseRequestOptions options)
databaseProperties - CosmosDatabaseProperties the database properties.throughputProperties - the throughput properties.options - CosmosDatabaseRequestOptions the request options.CosmosDatabaseResponse with the created database.public com.azure.cosmos.models.CosmosDatabaseResponse createDatabase(com.azure.cosmos.models.CosmosDatabaseProperties databaseProperties,
com.azure.cosmos.models.ThroughputProperties throughputProperties)
databaseProperties - CosmosDatabaseProperties the database properties.throughputProperties - the throughput properties.CosmosDatabaseResponse with the created database.public com.azure.cosmos.models.CosmosDatabaseResponse createDatabase(String id, com.azure.cosmos.models.ThroughputProperties throughputProperties)
id - the id of the database.throughputProperties - the throughput properties.CosmosDatabaseResponse with the created database.public com.azure.cosmos.util.CosmosPagedIterable<com.azure.cosmos.models.CosmosDatabaseProperties> readAllDatabases()
CosmosPagedIterable for feed response with the read databases.public com.azure.cosmos.util.CosmosPagedIterable<com.azure.cosmos.models.CosmosDatabaseProperties> queryDatabases(String query, com.azure.cosmos.models.CosmosQueryRequestOptions options)
query - the query.options - CosmosQueryRequestOptionsthe feed options.CosmosPagedIterable for feed response with the obtained databases.public com.azure.cosmos.util.CosmosPagedIterable<com.azure.cosmos.models.CosmosDatabaseProperties> queryDatabases(com.azure.cosmos.models.SqlQuerySpec querySpec,
com.azure.cosmos.models.CosmosQueryRequestOptions options)
querySpec - SqlQuerySpec the query spec.options - the query request options.CosmosPagedIterable for feed response with the obtained databases.public com.azure.cosmos.CosmosDatabase getDatabase(String id)
id - the id of the database.CosmosDatabase the cosmos sync database.public void close()
CosmosClient instance.close in interface Closeableclose in interface AutoCloseableCopyright © 2021 Liquibase.org. All rights reserved.