All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.azure.cosmos.implementation.AsyncDocumentClient Maven / Gradle / Ivy

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.cosmos.implementation;

import com.azure.core.credential.AzureKeyCredential;
import com.azure.core.credential.TokenCredential;
import com.azure.cosmos.ConsistencyLevel;
import com.azure.cosmos.CosmosAsyncClient;
import com.azure.cosmos.CosmosContainerProactiveInitConfig;
import com.azure.cosmos.CosmosEndToEndOperationLatencyPolicyConfig;
import com.azure.cosmos.CosmosItemSerializer;
import com.azure.cosmos.CosmosOperationPolicy;
import com.azure.cosmos.SessionRetryOptions;
import com.azure.cosmos.implementation.apachecommons.lang.StringUtils;
import com.azure.cosmos.implementation.batch.ServerBatchRequest;
import com.azure.cosmos.implementation.caches.RxClientCollectionCache;
import com.azure.cosmos.implementation.caches.RxPartitionKeyRangeCache;
import com.azure.cosmos.implementation.circuitBreaker.GlobalPartitionEndpointManagerForCircuitBreaker;
import com.azure.cosmos.implementation.clienttelemetry.ClientTelemetry;
import com.azure.cosmos.implementation.directconnectivity.AddressSelector;
import com.azure.cosmos.implementation.faultinjection.IFaultInjectorProvider;
import com.azure.cosmos.implementation.query.PartitionedQueryExecutionInfo;
import com.azure.cosmos.implementation.throughputControl.config.ThroughputControlGroupInternal;
import com.azure.cosmos.models.CosmosAuthorizationTokenResolver;
import com.azure.cosmos.models.CosmosBatchResponse;
import com.azure.cosmos.models.CosmosChangeFeedRequestOptions;
import com.azure.cosmos.models.CosmosClientTelemetryConfig;
import com.azure.cosmos.models.CosmosContainerIdentity;
import com.azure.cosmos.models.CosmosItemIdentity;
import com.azure.cosmos.models.CosmosPatchOperations;
import com.azure.cosmos.models.CosmosQueryRequestOptions;
import com.azure.cosmos.models.FeedRange;
import com.azure.cosmos.models.FeedResponse;
import com.azure.cosmos.models.PartitionKey;
import com.azure.cosmos.models.SqlQuerySpec;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

import java.net.URI;
import java.net.URISyntaxException;
import java.util.List;
import java.util.Map;

/**
 * Provides a client-side logical representation of the Azure Cosmos DB
 * database service. This async client is used to configure and execute requests
 * against the service.
 *
 * 

* {@link AsyncDocumentClient} async APIs return project reactor's {@link * Flux}, and so you can use project reactor {@link Flux} functionality. * The async {@link Flux} based APIs perform the requested operation only after * subscription. * *

* The service client encapsulates the endpoint and credentials used to access * the Cosmos DB service. *

* To instantiate you can use the {@link Builder} *

 * {@code
 * ConnectionPolicy connectionPolicy = new ConnectionPolicy(DirectConnectionConfig.getDefaultConfig());
 * AsyncDocumentClient client = new AsyncDocumentClient.Builder()
 *         .withServiceEndpoint(serviceEndpoint)
 *         .withMasterKeyOrResourceToken(masterKey)
 *         .withConnectionPolicy(connectionPolicy)
 *         .withConsistencyLevel(ConsistencyLevel.SESSION)
 *         .buildAsyncClient();
 * }
 * 
*/ public interface AsyncDocumentClient { /** * Helper class to buildAsyncClient {@link AsyncDocumentClient} instances * as logical representation of the Azure Cosmos DB database service. * *
     * {@code
     * ConnectionPolicy connectionPolicy = new ConnectionPolicy(DirectConnectionConfig.getDefaultConfig());
     * AsyncDocumentClient client = new AsyncDocumentClient.Builder()
     *         .withServiceEndpoint(serviceEndpoint)
     *         .withMasterKeyOrResourceToken(masterKey)
     *         .withConnectionPolicy(connectionPolicy)
     *         .withConsistencyLevel(ConsistencyLevel.SESSION)
     *         .buildAsyncClient();
     * }
     * 
*/ class Builder { Configs configs = new Configs(); ConnectionPolicy connectionPolicy; ConsistencyLevel desiredConsistencyLevel; List permissionFeed; String masterKeyOrResourceToken; URI serviceEndpoint; CosmosAuthorizationTokenResolver cosmosAuthorizationTokenResolver; AzureKeyCredential credential; TokenCredential tokenCredential; boolean sessionCapturingOverride; boolean transportClientSharing; boolean contentResponseOnWriteEnabled; private CosmosClientMetadataCachesSnapshot state; private ApiType apiType; CosmosClientTelemetryConfig clientTelemetryConfig; private String clientCorrelationId = null; private CosmosEndToEndOperationLatencyPolicyConfig cosmosEndToEndOperationLatencyPolicyConfig; private SessionRetryOptions sessionRetryOptions; private CosmosContainerProactiveInitConfig containerProactiveInitConfig; private CosmosItemSerializer defaultCustomSerializer; private boolean isRegionScopedSessionCapturingEnabled; private List operationPolicies; public Builder withServiceEndpoint(String serviceEndpoint) { try { this.serviceEndpoint = new URI(serviceEndpoint); } catch (URISyntaxException e) { throw new IllegalArgumentException(e.getMessage()); } return this; } public Builder withDefaultSerializer( CosmosItemSerializer defaultCustomSerializer) { this.defaultCustomSerializer = defaultCustomSerializer; return this; } public Builder withState(CosmosClientMetadataCachesSnapshot state) { this.state = state; return this; } public Builder withApiType(ApiType apiType) { this.apiType = apiType; return this; } public Builder withClientCorrelationId(String clientCorrelationId) { this.clientCorrelationId = clientCorrelationId; return this; } /** * New method withMasterKeyOrResourceToken will take either master key or resource token * and perform authentication for accessing resource. * * @param masterKeyOrResourceToken MasterKey or resourceToken for authentication. * @return current Builder. * @deprecated use {@link #withMasterKeyOrResourceToken(String)} instead. */ @Deprecated public Builder withMasterKey(String masterKeyOrResourceToken) { this.masterKeyOrResourceToken = masterKeyOrResourceToken; return this; } /** * This method will accept the master key , additionally it can also consume * resource token too for authentication. * * @param masterKeyOrResourceToken MasterKey or resourceToken for authentication. * @return current Builder. */ public Builder withMasterKeyOrResourceToken(String masterKeyOrResourceToken) { this.masterKeyOrResourceToken = masterKeyOrResourceToken; return this; } /** * This method will accept the permission list , which contains the * resource tokens needed to access resources. * * @param permissionFeed Permission list for authentication. * @return current Builder. */ public Builder withPermissionFeed(List permissionFeed) { this.permissionFeed = permissionFeed; return this; } public Builder withConsistencyLevel(ConsistencyLevel desiredConsistencyLevel) { this.desiredConsistencyLevel = desiredConsistencyLevel; return this; } public Builder withConfigs(Configs configs) { this.configs = configs; return this; } public Builder withSessionCapturingOverride(boolean sessionCapturingOverride) { this.sessionCapturingOverride = sessionCapturingOverride; return this; } public Builder withConnectionPolicy(ConnectionPolicy connectionPolicy) { this.connectionPolicy = connectionPolicy; return this; } public Builder withTransportClientSharing(boolean transportClientSharing) { this.transportClientSharing = transportClientSharing; return this; } public Builder withCredential(AzureKeyCredential credential) { if (credential != null && StringUtils.isEmpty(credential.getKey())) { throw new IllegalArgumentException("Cannot buildAsyncClient client with empty key credential"); } this.credential = credential; return this; } public Builder withContentResponseOnWriteEnabled(boolean contentResponseOnWriteEnabled) { this.contentResponseOnWriteEnabled = contentResponseOnWriteEnabled; return this; } /** * This method will accept functional interface TokenResolver which helps in generation authorization * token per request. AsyncDocumentClient can be successfully initialized with this API without passing any MasterKey, ResourceToken or PermissionFeed. * @param cosmosAuthorizationTokenResolver The tokenResolver * @return current Builder. */ public Builder withTokenResolver(CosmosAuthorizationTokenResolver cosmosAuthorizationTokenResolver) { this.cosmosAuthorizationTokenResolver = cosmosAuthorizationTokenResolver; return this; } /** * This method will accept functional interface TokenCredential which helps in generation authorization * token per request. AsyncDocumentClient can be successfully initialized with this API without passing any MasterKey, ResourceToken or PermissionFeed. * @param tokenCredential the token credential * @return current Builder. */ public Builder withTokenCredential(TokenCredential tokenCredential) { this.tokenCredential = tokenCredential; return this; } /*** * Set the client telemetry config. * * @param clientTelemetryConfig the {@link CosmosClientTelemetryConfig}. * * @return the current builder. */ public Builder withClientTelemetryConfig(CosmosClientTelemetryConfig clientTelemetryConfig) { this.clientTelemetryConfig = clientTelemetryConfig; return this; } public Builder withEndToEndOperationLatencyPolicyConfig(CosmosEndToEndOperationLatencyPolicyConfig endToEndOperationLatencyPolicyConfig) { this.cosmosEndToEndOperationLatencyPolicyConfig = endToEndOperationLatencyPolicyConfig; return this; } public Builder withSessionRetryOptions(SessionRetryOptions sessionRetryOptions) { this.sessionRetryOptions = sessionRetryOptions; return this; } public Builder withContainerProactiveInitConfig(CosmosContainerProactiveInitConfig containerProactiveInitConfig) { this.containerProactiveInitConfig = containerProactiveInitConfig; return this; } public Builder withRegionScopedSessionCapturingEnabled(boolean isRegionScopedSessionCapturingEnabled) { this.isRegionScopedSessionCapturingEnabled = isRegionScopedSessionCapturingEnabled; return this; } private void ifThrowIllegalArgException(boolean value, String error) { if (value) { throw new IllegalArgumentException(error); } } public AsyncDocumentClient build() { ifThrowIllegalArgException(this.serviceEndpoint == null || StringUtils.isEmpty(this.serviceEndpoint.toString()), "cannot buildAsyncClient client without service endpoint"); ifThrowIllegalArgException( this.masterKeyOrResourceToken == null && (permissionFeed == null || permissionFeed.isEmpty()) && this.credential == null && this.tokenCredential == null && this.cosmosAuthorizationTokenResolver == null, "cannot buildAsyncClient client without any one of masterKey, " + "resource token, permissionFeed and azure key credential"); ifThrowIllegalArgException(credential != null && StringUtils.isEmpty(credential.getKey()), "cannot buildAsyncClient client without key credential"); RxDocumentClientImpl client = new RxDocumentClientImpl(serviceEndpoint, masterKeyOrResourceToken, permissionFeed, connectionPolicy, desiredConsistencyLevel, configs, cosmosAuthorizationTokenResolver, credential, tokenCredential, sessionCapturingOverride, transportClientSharing, contentResponseOnWriteEnabled, state, apiType, clientTelemetryConfig, clientCorrelationId, cosmosEndToEndOperationLatencyPolicyConfig, sessionRetryOptions, containerProactiveInitConfig, defaultCustomSerializer, isRegionScopedSessionCapturingEnabled, operationPolicies ); client.init(state, null); return client; } public Configs getConfigs() { return configs; } public void setConfigs(Configs configs) { this.configs = configs; } public ConnectionPolicy getConnectionPolicy() { return connectionPolicy; } public void setConnectionPolicy(ConnectionPolicy connectionPolicy) { this.connectionPolicy = connectionPolicy; } public ConsistencyLevel getDesiredConsistencyLevel() { return desiredConsistencyLevel; } public URI getServiceEndpoint() { return serviceEndpoint; } public void setServiceEndpoint(URI serviceEndpoint) { this.serviceEndpoint = serviceEndpoint; } public AzureKeyCredential getCredential() { return credential; } public Builder withOperationPolicies(List operationPolicies) { this.operationPolicies = operationPolicies; return this; } } /** * Gets the default service endpoint as passed in by the user during construction. * * @return the service endpoint URI */ URI getServiceEndpoint(); /** * Gets the desired consistency level * * @return the consistency level */ ConsistencyLevel getConsistencyLevel(); /** * Gets the client telemetry * * @return the client telemetry */ ClientTelemetry getClientTelemetry(); String getClientCorrelationId(); String getMachineId(); String getUserAgent(); /** * Gets the boolean which indicates whether to only return the headers and status code in Cosmos DB response * in case of Create, Update and Delete operations on CosmosItem. *

* If set to false (which is by default), this removes the resource from response. It reduces networking * and CPU load by not sending the resource back over the network and serializing it * on the client. *

* By-default, this is false. * * @return a boolean indicating whether resource will be included in the response or not. */ boolean isContentResponseOnWriteEnabled(); /** * Gets the connection policy * * @return the connection policy */ ConnectionPolicy getConnectionPolicy(); /** * Creates a database. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the created database. * In case of failure the {@link Mono} will error. * * @param database the database. * @param options the request options. * @return a {@link Mono} containing the single resource response with the created database or an error. */ Mono> createDatabase(Database database, RequestOptions options); /** * Deletes a database. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the deleted database. * In case of failure the {@link Mono} will error. * * @param databaseLink the database link. * @param options the request options. * @return a {@link Mono} containing the single resource response with the deleted database or an error. */ Mono> deleteDatabase(String databaseLink, RequestOptions options); /** * Reads a database. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the read database. * In case of failure the {@link Mono} will error. * * @param databaseLink the database link. * @param options the request options. * @return a {@link Mono} containing the single resource response with the read database or an error. */ Mono> readDatabase(String databaseLink, RequestOptions options); /** * Reads all databases. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response of the read databases. * In case of failure the {@link Flux} will error. * * @param state the query operation state * @return a {@link Flux} containing one or several feed response pages of read databases or an error. */ Flux> readDatabases(QueryFeedOperationState state); /** * Query for databases. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response of the read databases. * In case of failure the {@link Flux} will error. * * @param query the query. * @param state the query operation state. * @return a {@link Flux} containing one or several feed response pages of read databases or an error. */ Flux> queryDatabases(String query, QueryFeedOperationState state); /** * Query for databases. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response of the obtained databases. * In case of failure the {@link Flux} will error. * * @param querySpec the SQL query specification. * @param state the query operation state. * @return a {@link Flux} containing one or several feed response pages of the obtained databases or an error. */ Flux> queryDatabases(SqlQuerySpec querySpec, QueryFeedOperationState state); /** * Creates a document collection. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the created collection. * In case of failure the {@link Mono} will error. * * @param databaseLink the database link. * @param collection the collection. * @param options the request options. * @return a {@link Mono} containing the single resource response with the created collection or an error. */ Mono> createCollection(String databaseLink, DocumentCollection collection, RequestOptions options); /** * Replaces a document collection. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the replaced document collection. * In case of failure the {@link Mono} will error. * * @param collection the document collection to use. * @param options the request options. * @return a {@link Mono} containing the single resource response with the replaced document collection or an error. */ Mono> replaceCollection(DocumentCollection collection, RequestOptions options); /** * Deletes a document collection *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response for the deleted database. * In case of failure the {@link Mono} will error. * * @param collectionLink the collection link. * @param options the request options. * @return a {@link Mono} containing the single resource response for the deleted database or an error. */ Mono> deleteCollection(String collectionLink, RequestOptions options); /** * Reads a document collection *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the read collection. * In case of failure the {@link Mono} will error. * * @param collectionLink the collection link. * @param options the request options. * @return a {@link Mono} containing the single resource response with the read collection or an error. */ Mono> readCollection(String collectionLink, RequestOptions options); /** * Reads all document collections in a database. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response of the read collections. * In case of failure the {@link Flux} will error. * * @param databaseLink the database link. * @param state the query option state. * @return a {@link Flux} containing one or several feed response pages of the read collections or an error. */ Flux> readCollections(String databaseLink, QueryFeedOperationState state); /** * Query for document collections in a database. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response of the obtained collections. * In case of failure the {@link Flux} will error. * * @param databaseLink the database link. * @param query the query. * @param state the query operation state. * @return a {@link Flux} containing one or several feed response pages of the obtained collections or an error. */ Flux> queryCollections(String databaseLink, String query, QueryFeedOperationState state); /** * Query for document collections in a database. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response of the obtained collections. * In case of failure the {@link Flux} will error. * * @param databaseLink the database link. * @param querySpec the SQL query specification. * @param state the query operation state. * @return a {@link Flux} containing one or several feed response pages of the obtained collections or an error. */ Flux> queryCollections(String databaseLink, SqlQuerySpec querySpec, QueryFeedOperationState state); /** * Creates a document. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the created document. * In case of failure the {@link Mono} will error. * * @param collectionLink the link to the parent document collection. * @param document the document represented as a POJO or Document object. * @param options the request options. * @param disableAutomaticIdGeneration the flag for disabling automatic id generation. * @return a {@link Mono} containing the single resource response with the created document or an error. */ Mono> createDocument(String collectionLink, Object document, RequestOptions options, boolean disableAutomaticIdGeneration); /** * Upserts a document. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the upserted document. * In case of failure the {@link Mono} will error. * * @param collectionLink the link to the parent document collection. * @param document the document represented as a POJO or Document object to upsert. * @param options the request options. * @param disableAutomaticIdGeneration the flag for disabling automatic id generation. * @return a {@link Mono} containing the single resource response with the upserted document or an error. */ Mono> upsertDocument(String collectionLink, Object document, RequestOptions options, boolean disableAutomaticIdGeneration); /** * Replaces a document using a POJO object. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the replaced document. * In case of failure the {@link Mono} will error. * * @param documentLink the document link. * @param document the document represented as a POJO or Document object. * @param options the request options. * @return a {@link Mono} containing the single resource response with the replaced document or an error. */ Mono> replaceDocument(String documentLink, Object document, RequestOptions options); /** * Apply patch on an item. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the patched document. * In case of failure the {@link Mono} will error. * * @param documentLink the document link. * @param cosmosPatchOperations container with the list of patch operations. * @param options the request options. * * @return a {@link Mono} containing the single resource response with the patched document or an error. */ Mono> patchDocument(String documentLink, CosmosPatchOperations cosmosPatchOperations, RequestOptions options); /** * Replaces a document with the passed in document. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the replaced document. * In case of failure the {@link Mono} will error. * * @param document the document to replace (containing the document id). * @param options the request options. * @return a {@link Mono} containing the single resource response with the replaced document or an error. */ Mono> replaceDocument(Document document, RequestOptions options); /** * Deletes a document *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response for the deleted document. * In case of failure the {@link Mono} will error. * * @param documentLink the document link. * @param options the request options. * @return a {@link Mono} containing the single resource response for the deleted document or an error. */ Mono> deleteDocument(String documentLink, RequestOptions options); /** * Deletes a document *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response for the deleted document. * In case of failure the {@link Mono} will error. * * @param internalObjectNode the internalObjectNode to delete (containing the id). * @param options the request options. * @return a {@link Mono} containing the single resource response for the deleted document or an error. */ Mono> deleteDocument(String documentLink, InternalObjectNode internalObjectNode, RequestOptions options); Mono> deleteAllDocumentsByPartitionKey(String collectionLink, PartitionKey partitionKey, RequestOptions options); /** * Reads a document *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the read document. * In case of failure the {@link Mono} will error. * * @param documentLink the document link. * @param options the request options. * @return a {@link Mono} containing the single resource response with the read document or an error. */ Mono> readDocument(String documentLink, RequestOptions options); /** * Reads all documents in a document collection. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response of the read documents. * In case of failure the {@link Flux} will error. * * @param collectionLink the collection link. * @param state the query operation state. * @param the type parameter * @return a {@link Flux} containing one or several feed response pages of the read documents or an error. */ Flux> readDocuments( String collectionLink, QueryFeedOperationState state, Class classOfT); /** * Query for documents in a document collection. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response of the obtained documents. * In case of failure the {@link Flux} will error. * * @param collectionLink the link to the parent document collection. * @param query the query. * @param state the query operation state. * @param the type parameter * @return a {@link Flux} containing one or several feed response pages of the obtained document or an error. */ Flux> queryDocuments( String collectionLink, String query, QueryFeedOperationState state, Class classOfT); /** * Query for documents in a document collection. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response of the obtained documents. * In case of failure the {@link Flux} will error. * * @param collectionLink the link to the parent document collection. * @param querySpec the SQL query specification. * @param state the query operation state. * @param the type parameter * @return a {@link Flux} containing one or several feed response pages of the obtained documents or an error. */ Flux> queryDocuments( String collectionLink, SqlQuerySpec querySpec, QueryFeedOperationState state, Class classOfT); /** * Query for documents change feed in a document collection. * After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response pages of the obtained documents. * In case of failure the {@link Flux} will error. * * @param collection the parent document collection. * @param requestOptions the change feed request options. * @param the type parameter * @return a {@link Flux} containing one or several feed response pages of the obtained documents or an error. */ Flux> queryDocumentChangeFeed( DocumentCollection collection, CosmosChangeFeedRequestOptions requestOptions, Class classOfT); /** * Query for documents change feed in a document collection. * After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response pages of the obtained documents. * In case of failure the {@link Flux} will error. * * @param collection the parent document collection. * @param state the change feed operation state. * @param the type parameter * @return a {@link Flux} containing one or several feed response pages of the obtained documents or an error. */ Flux> queryDocumentChangeFeedFromPagedFlux( DocumentCollection collection, ChangeFeedOperationState state, Class classOfT); /** * Reads all partition key ranges in a document collection. * After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response pages of the obtained partition key ranges. * In case of failure the {@link Flux} will error. * * @param collectionLink the link to the parent document collection. * @param state the query operation state. * @return a {@link Flux} containing one or several feed response pages of the obtained partition key ranges or an error. */ Flux> readPartitionKeyRanges(String collectionLink, QueryFeedOperationState state); Flux> readPartitionKeyRanges(String collectionLink, CosmosQueryRequestOptions options); /** * Gets the feed ranges of a container. * * @param collectionLink the link to the parent document collection. * @param forceRefresh a flag indicating whether to force a refresh * @return a {@link List} of @{link FeedRange} containing the feed ranges of a container. */ Mono> getFeedRanges(String collectionLink, boolean forceRefresh); /** * Creates a stored procedure. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the created stored procedure. * In case of failure the {@link Mono} will error. * * @param collectionLink the collection link. * @param storedProcedure the stored procedure to create. * @param options the request options. * @return a {@link Mono} containing the single resource response with the created stored procedure or an error. */ Mono> createStoredProcedure(String collectionLink, StoredProcedure storedProcedure, RequestOptions options); /** * Replaces a stored procedure. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the replaced stored procedure. * In case of failure the {@link Mono} will error. * * @param storedProcedure the stored procedure to use. * @param options the request options. * @return a {@link Mono} containing the single resource response with the replaced stored procedure or an error. */ Mono> replaceStoredProcedure(StoredProcedure storedProcedure, RequestOptions options); /** * Deletes a stored procedure *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response for the deleted stored procedure. * In case of failure the {@link Mono} will error. * * @param storedProcedureLink the stored procedure link. * @param options the request options. * @return a {@link Mono} containing the single resource response for the deleted stored procedure or an error. */ Mono> deleteStoredProcedure(String storedProcedureLink, RequestOptions options); /** * READ a stored procedure *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the read stored procedure. * In case of failure the {@link Mono} will error. * * @param storedProcedureLink the stored procedure link. * @param options the request options. * @return a {@link Mono} containing the single resource response with the read stored procedure or an error. */ Mono> readStoredProcedure(String storedProcedureLink, RequestOptions options); /** * Reads all stored procedures in a document collection link. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response pages of the read stored procedures. * In case of failure the {@link Flux} will error. * * @param collectionLink the collection link. * @param state the query operation state. * @return a {@link Flux} containing one or several feed response pages of the read stored procedures or an error. */ Flux> readStoredProcedures(String collectionLink, QueryFeedOperationState state); /** * Query for stored procedures in a document collection. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response pages of the obtained stored procedures. * In case of failure the {@link Flux} will error. * * @param collectionLink the collection link. * @param query the query. * @param state the query operation state. * @return a {@link Flux} containing one or several feed response pages of the obtained stored procedures or an error. */ Flux> queryStoredProcedures(String collectionLink, String query, QueryFeedOperationState state); /** * Query for stored procedures in a document collection. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response pages of the obtained stored procedures. * In case of failure the {@link Flux} will error. * * @param collectionLink the collection link. * @param querySpec the SQL query specification. * @param state the query operation state. * @return a {@link Flux} containing one or several feed response pages of the obtained stored procedures or an error. */ Flux> queryStoredProcedures(String collectionLink, SqlQuerySpec querySpec, QueryFeedOperationState state); /** * Executes a stored procedure *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the stored procedure response. * In case of failure the {@link Mono} will error. * * @param storedProcedureLink the stored procedure link. * @param options the request options. * @param procedureParams the array of procedure parameter values. * @return a {@link Mono} containing the single resource response with the stored procedure response or an error. */ Mono executeStoredProcedure(String storedProcedureLink, RequestOptions options, List procedureParams); /** * Executes a batch request *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a batch response which will have individual responses. * In case of failure the {@link Mono} will error. * * @param collectionLink the link to the parent document collection. * @param serverBatchRequest the batch request with the content and flags. * @param options the request options. * @param disableAutomaticIdGeneration the flag for disabling automatic id generation. * @return a {@link Mono} containing the transactionalBatchResponse response which results of all operations. */ Mono executeBatchRequest(String collectionLink, ServerBatchRequest serverBatchRequest, RequestOptions options, boolean disableAutomaticIdGeneration); /** * Creates a trigger. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the created trigger. * In case of failure the {@link Mono} will error. * * @param collectionLink the collection link. * @param trigger the trigger. * @param options the request options. * @return a {@link Mono} containing the single resource response with the created trigger or an error. */ Mono> createTrigger(String collectionLink, Trigger trigger, RequestOptions options); /** * Replaces a trigger. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the replaced trigger. * In case of failure the {@link Mono} will error. * * @param trigger the trigger to use. * @param options the request options. * @return a {@link Mono} containing the single resource response with the replaced trigger or an error. */ Mono> replaceTrigger(Trigger trigger, RequestOptions options); /** * Deletes a trigger. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response for the deleted trigger. * In case of failure the {@link Mono} will error. * * @param triggerLink the trigger link. * @param options the request options. * @return a {@link Mono} containing the single resource response for the deleted trigger or an error. */ Mono> deleteTrigger(String triggerLink, RequestOptions options); /** * Reads a trigger *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response for the read trigger. * In case of failure the {@link Mono} will error. * * @param triggerLink the trigger link. * @param options the request options. * @return a {@link Mono} containing the single resource response for the read trigger or an error. */ Mono> readTrigger(String triggerLink, RequestOptions options); /** * Reads all triggers in a document collection. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response pages of the read triggers. * In case of failure the {@link Flux} will error. * * @param collectionLink the collection link. * @param state the query operation state. * @return a {@link Flux} containing one or several feed response pages of the read triggers or an error. */ Flux> readTriggers(String collectionLink, QueryFeedOperationState state); /** * Query for triggers. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response pages of the obtained triggers. * In case of failure the {@link Flux} will error. * * @param collectionLink the collection link. * @param query the query. * @param state the query operation state. * @return a {@link Flux} containing one or several feed response pages of the obtained triggers or an error. */ Flux> queryTriggers(String collectionLink, String query, QueryFeedOperationState state); /** * Query for triggers. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response pages of the obtained triggers. * In case of failure the {@link Flux} will error. * * @param collectionLink the collection link. * @param querySpec the SQL query specification. * @param state the query operation state. * @return a {@link Flux} containing one or several feed response pages of the obtained triggers or an error. */ Flux> queryTriggers(String collectionLink, SqlQuerySpec querySpec, QueryFeedOperationState state); /** * Creates a user defined function. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the created user defined function. * In case of failure the {@link Mono} will error. * * @param collectionLink the collection link. * @param udf the user defined function. * @param options the request options. * @return a {@link Mono} containing the single resource response with the created user defined function or an error. */ Mono> createUserDefinedFunction(String collectionLink, UserDefinedFunction udf, RequestOptions options); /** * Replaces a user defined function. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the replaced user defined function. * In case of failure the {@link Mono} will error. * * @param udf the user defined function. * @param options the request options. * @return a {@link Mono} containing the single resource response with the replaced user defined function or an error. */ Mono> replaceUserDefinedFunction(UserDefinedFunction udf, RequestOptions options); /** * Deletes a user defined function. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response for the deleted user defined function. * In case of failure the {@link Mono} will error. * * @param udfLink the user defined function link. * @param options the request options. * @return a {@link Mono} containing the single resource response for the deleted user defined function or an error. */ Mono> deleteUserDefinedFunction(String udfLink, RequestOptions options); /** * READ a user defined function. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response for the read user defined function. * In case of failure the {@link Mono} will error. * * @param udfLink the user defined function link. * @param options the request options. * @return a {@link Mono} containing the single resource response for the read user defined function or an error. */ Mono> readUserDefinedFunction(String udfLink, RequestOptions options); /** * Reads all user defined functions in a document collection. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response pages of the read user defined functions. * In case of failure the {@link Flux} will error. * * @param collectionLink the collection link. * @param state the query operation state. * @return a {@link Flux} containing one or several feed response pages of the read user defined functions or an error. */ Flux> readUserDefinedFunctions(String collectionLink, QueryFeedOperationState state); /** * Query for user defined functions. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response pages of the obtained user defined functions. * In case of failure the {@link Flux} will error. * * @param collectionLink the collection link. * @param query the query. * @param state the query operation state. * @return a {@link Flux} containing one or several feed response pages of the obtained user defined functions or an error. */ Flux> queryUserDefinedFunctions(String collectionLink, String query, QueryFeedOperationState state); /** * Query for user defined functions. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response pages of the obtained user defined functions. * In case of failure the {@link Flux} will error. * * @param collectionLink the collection link. * @param querySpec the SQL query specification. * @param state the query operation state. * @return a {@link Flux} containing one or several feed response pages of the obtained user defined functions or an error. */ Flux> queryUserDefinedFunctions(String collectionLink, SqlQuerySpec querySpec, QueryFeedOperationState state); /** * Reads a conflict. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the read conflict. * In case of failure the {@link Mono} will error. * * @param conflictLink the conflict link. * @param options the request options. * @return a {@link Mono} containing the single resource response with the read conflict or an error. */ Mono> readConflict(String conflictLink, RequestOptions options); /** * Reads all conflicts in a document collection. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response pages of the read conflicts. * In case of failure the {@link Flux} will error. * * @param collectionLink the collection link. * @param state the query operation state. * @return a {@link Flux} containing one or several feed response pages of the read conflicts or an error. */ Flux> readConflicts(String collectionLink, QueryFeedOperationState state); /** * Query for conflicts. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response pages of the obtained conflicts. * In case of failure the {@link Flux} will error. * * @param collectionLink the collection link. * @param query the query statement. * @param state the query operation state. * @return a {@link Flux} containing one or several feed response pages of the obtained conflicts or an error. */ Flux> queryConflicts(String collectionLink, String query, QueryFeedOperationState state); /** * Query for conflicts. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response pages of the obtained conflicts. * In case of failure the {@link Flux} will error. * * @param collectionLink the collection link. * @param querySpec the SQL query specification. * @param state the query operation state. * @return a {@link Flux} containing one or several feed response pages of the obtained conflicts or an error. */ Flux> queryConflicts(String collectionLink, SqlQuerySpec querySpec, QueryFeedOperationState state); /** * Deletes a conflict. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response for the deleted conflict. * In case of failure the {@link Mono} will error. * * @param conflictLink the conflict link. * @param options the request options. * @return a {@link Mono} containing the single resource response for the deleted conflict or an error. */ Mono> deleteConflict(String conflictLink, RequestOptions options); /** * Creates a user. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the created user. * In case of failure the {@link Mono} will error. * * @param databaseLink the database link. * @param user the user to create. * @param options the request options. * @return a {@link Mono} containing the single resource response with the created user or an error. */ Mono> createUser(String databaseLink, User user, RequestOptions options); /** * Upserts a user. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the upserted user. * In case of failure the {@link Mono} will error. * * @param databaseLink the database link. * @param user the user to upsert. * @param options the request options. * @return a {@link Mono} containing the single resource response with the upserted user or an error. */ Mono> upsertUser(String databaseLink, User user, RequestOptions options); /** * Replaces a user. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the replaced user. * In case of failure the {@link Mono} will error. * * @param user the user to use. * @param options the request options. * @return a {@link Mono} containing the single resource response with the replaced user or an error. */ Mono> replaceUser(User user, RequestOptions options); /** * Deletes a user. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response for the deleted user. * In case of failure the {@link Mono} will error. * * @param userLink the user link. * @param options the request options. * @return a {@link Mono} containing the single resource response for the deleted user or an error. */ Mono> deleteUser(String userLink, RequestOptions options); /** * Reads a user. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the read user. * In case of failure the {@link Mono} will error. * * @param userLink the user link. * @param options the request options. * @return a {@link Mono} containing the single resource response with the read user or an error. */ Mono> readUser(String userLink, RequestOptions options); /** * Reads all users in a database. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response pages of the read users. * In case of failure the {@link Flux} will error. * * @param databaseLink the database link. * @param state the query operation state. * @return a {@link Flux} containing one or several feed response pages of the read users or an error. */ Flux> readUsers(String databaseLink, QueryFeedOperationState state); /** * Query for users. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response pages of the obtained users. * In case of failure the {@link Flux} will error. * * @param databaseLink the database link. * @param query the query. * @param state the query operation state. * @return a {@link Flux} containing one or several feed response pages of the obtained users or an error. */ Flux> queryUsers(String databaseLink, String query, QueryFeedOperationState state); /** * Query for users. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response pages of the obtained users. * In case of failure the {@link Flux} will error. * * @param databaseLink the database link. * @param querySpec the SQL query specification. * @param state the query operation state. * @return a {@link Flux} containing one or several feed response pages of the obtained users or an error. */ Flux> queryUsers(String databaseLink, SqlQuerySpec querySpec, QueryFeedOperationState state); /** * Reads a client encryption key. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the read client encryption key. * In case of failure the {@link Mono} will error. * * @param clientEncryptionKeyLink the client encryption key link. * @param options the request options. * @return a {@link Mono} containing the single resource response with the read user or an error. */ Mono> readClientEncryptionKey(String clientEncryptionKeyLink, RequestOptions options); /** * Creates a client encryption key. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the created client encryption key. * In case of failure the {@link Mono} will error. * * @param databaseLink the database link. * @param clientEncryptionKey the client encryption key to create. * @param options the request options. * @return a {@link Mono} containing the single resource response with the created client encryption key or an error. */ Mono> createClientEncryptionKey(String databaseLink, ClientEncryptionKey clientEncryptionKey, RequestOptions options); /** * Replaces a client encryption key. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the replaced client encryption key. * In case of failure the {@link Mono} will error. * * @param clientEncryptionKey the client encryption key to use. * @param options the request options. * @return a {@link Mono} containing the single resource response with the replaced client encryption keyer or an error. */ Mono> replaceClientEncryptionKey(ClientEncryptionKey clientEncryptionKey, String nameBasedLink, RequestOptions options); /** * Reads all client encryption keys in a database. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response pages of the read client encryption keys. * In case of failure the {@link Flux} will error. * * @param databaseLink the database link. * @param state the query option state. * @return a {@link Flux} containing one or several feed response pages of the read client encryption keys or an error. */ Flux> readClientEncryptionKeys(String databaseLink, QueryFeedOperationState state); /** * Query for client encryption keys. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response pages of the obtained client encryption keys. * In case of failure the {@link Flux} will error. * * @param databaseLink the database link. * @param querySpec the SQL query specification. * @param state the query operation state * @return a {@link Flux} containing one or several feed response pages of the obtained client encryption keys or an error. */ Flux> queryClientEncryptionKeys(String databaseLink, SqlQuerySpec querySpec, QueryFeedOperationState state); /** * Creates a permission. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the created permission. * In case of failure the {@link Mono} will error. * * @param userLink the user link. * @param permission the permission to create. * @param options the request options. * @return a {@link Mono} containing the single resource response with the created permission or an error. */ Mono> createPermission(String userLink, Permission permission, RequestOptions options); /** * Upserts a permission. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the upserted permission. * In case of failure the {@link Mono} will error. * * @param userLink the user link. * @param permission the permission to upsert. * @param options the request options. * @return a {@link Mono} containing the single resource response with the upserted permission or an error. */ Mono> upsertPermission(String userLink, Permission permission, RequestOptions options); /** * Replaces a permission. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the replaced permission. * In case of failure the {@link Mono} will error. * * @param permission the permission to use. * @param options the request options. * @return a {@link Mono} containing the single resource response with the replaced permission or an error. */ Mono> replacePermission(Permission permission, RequestOptions options); /** * Deletes a permission. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response for the deleted permission. * In case of failure the {@link Mono} will error. * * @param permissionLink the permission link. * @param options the request options. * @return a {@link Mono} containing the single resource response for the deleted permission or an error. */ Mono> deletePermission(String permissionLink, RequestOptions options); /** * Reads a permission. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the read permission. * In case of failure the {@link Mono} will error. * * @param permissionLink the permission link. * @param options the request options. * @return a {@link Mono} containing the single resource response with the read permission or an error. */ Mono> readPermission(String permissionLink, RequestOptions options); /** * Reads all permissions. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response pages of the read permissions. * In case of failure the {@link Flux} will error. * * @param permissionLink the permission link. * @param state the query operation state. * @return a {@link Flux} containing one or several feed response pages of the read permissions or an error. */ Flux> readPermissions(String permissionLink, QueryFeedOperationState state); /** * Query for permissions. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response pages of the obtained permissions. * In case of failure the {@link Flux} will error. * * @param permissionLink the permission link. * @param query the query. * @param state the query operation state * @return a {@link Flux} containing one or several feed response pages of the obtained permissions or an error. */ Flux> queryPermissions(String permissionLink, String query, QueryFeedOperationState state); /** * Query for permissions. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response pages of the obtained permissions. * In case of failure the {@link Flux} will error. * * @param permissionLink the permission link. * @param querySpec the SQL query specification. * @param state the query operation state * @return a {@link Flux} containing one or several feed response pages of the obtained permissions or an error. */ Flux> queryPermissions(String permissionLink, SqlQuerySpec querySpec, QueryFeedOperationState state); /** * Replaces an offer. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the replaced offer. * In case of failure the {@link Mono} will error. * * @param offer the offer to use. * @return a {@link Mono} containing the single resource response with the replaced offer or an error. */ Mono> replaceOffer(Offer offer); /** * Reads an offer. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the read offer. * In case of failure the {@link Mono} will error. * * @param offerLink the offer link. * @return a {@link Mono} containing the single resource response with the read offer or an error. */ Mono> readOffer(String offerLink); /** * Reads offers. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response pages of the read offers. * In case of failure the {@link Flux} will error. * * @param state the query operation request. * @return a {@link Flux} containing one or several feed response pages of the read offers or an error. */ Flux> readOffers(QueryFeedOperationState state); /** * Query for offers in a database. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response pages of obtained obtained offers. * In case of failure the {@link Flux} will error. * * @param query the query. * @param state the query operation state. * @return a {@link Flux} containing one or several feed response pages of the obtained offers or an error. */ Flux> queryOffers(String query, QueryFeedOperationState state); /** * Query for offers in a database. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response pages of obtained obtained offers. * In case of failure the {@link Flux} will error. * * @param querySpec the query specification. * @param state the query operation state. * @return a {@link Flux} containing one or several feed response pages of the obtained offers or an error. */ Flux> queryOffers(SqlQuerySpec querySpec, QueryFeedOperationState state); /** * Gets database account information. *

* After subscription the operation will be performed. * The {@link Mono} upon successful completion will contain a single resource response with the database account. * In case of failure the {@link Mono} will error. * * @return a {@link Mono} containing the single resource response with the database account or an error. */ Mono getDatabaseAccount(); /** * Reads many documents at once * @param itemIdentityList CosmosItem id and partition key tuple of items that that needs to be read * @param collectionLink link for the documentcollection/container to be queried * @param state the query operation state * @param klass class type * @return a Mono with feed response of documents */ Mono> readMany( List itemIdentityList, String collectionLink, QueryFeedOperationState state, Class klass); /** * Read all documents of a certain logical partition. *

* After subscription the operation will be performed. * The {@link Flux} will contain one or several feed response of the obtained documents. * In case of failure the {@link Flux} will error. * * @param collectionLink the link to the parent document collection. * @param partitionKey the logical partition key. * @param state the query operation state. * @param the type parameter * @return a {@link Flux} containing one or several feed response pages of the obtained documents or an error. */ Flux> readAllDocuments( String collectionLink, PartitionKey partitionKey, QueryFeedOperationState state, Class classOfT ); Map getQueryPlanCache(); /** * Gets the collection cache. * * @return the collection Cache */ RxClientCollectionCache getCollectionCache(); /** * Gets the partition key range cache. * * @return the partition key range cache */ RxPartitionKeyRangeCache getPartitionKeyRangeCache(); /*** * Get the global endpoint manager. * * @return the global endpoint manager. */ GlobalEndpointManager getGlobalEndpointManager(); GlobalPartitionEndpointManagerForCircuitBreaker getGlobalPartitionEndpointManagerForCircuitBreaker(); /*** * Get the address selector. * @return the address selector. */ AddressSelector getAddressSelector(); /** * Close this {@link AsyncDocumentClient} instance and cleans up the resources. */ void close(); CosmosItemSerializer getEffectiveItemSerializer(CosmosItemSerializer requestOptionsItemSerializer); /** * Enable throughput control group. * * @param group the throughput control group. */ void enableThroughputControlGroup(ThroughputControlGroupInternal group, Mono throughputQueryMono); /** * Submits open connection tasks and warms up caches for replicas for containers specified by * {@link CosmosContainerProactiveInitConfig#getCosmosContainerIdentities()} and in * {@link CosmosContainerProactiveInitConfig#getProactiveConnectionRegionsCount()} preferred regions. * * @param proactiveContainerInitConfig the instance encapsulating a list of container identities and * no. of proactive connection regions */ Flux submitOpenConnectionTasksAndInitCaches(CosmosContainerProactiveInitConfig proactiveContainerInitConfig); ConsistencyLevel getDefaultConsistencyLevelOfAccount(); /*** * Configure fault injector provider. * * @param injectorProvider the fault injector provider. */ void configureFaultInjectorProvider(IFaultInjectorProvider injectorProvider); /** * Mark the openConnectionAndInitCaches completed. * * @param cosmosContainerIdentities the {@link CosmosContainerIdentity} list. */ void recordOpenConnectionsAndInitCachesCompleted(List cosmosContainerIdentities); /** * Mark the openConnectionAndInitCaches to start. * * @param cosmosContainerIdentities the {@link CosmosContainerIdentity} list. */ void recordOpenConnectionsAndInitCachesStarted(List cosmosContainerIdentities); public String getMasterKeyOrResourceToken(); }