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

com.azure.cosmos.implementation.query.IDocumentQueryClient Maven / Gradle / Ivy

Go to download

This Package contains Microsoft Azure Cosmos SDK (with Reactive Extension Reactor support) for Azure Cosmos DB SQL API

There is a newer version: 4.60.0
Show newest version
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.cosmos.implementation.query;

import com.azure.cosmos.implementation.caches.IPartitionKeyRangeCache;
import com.azure.cosmos.implementation.caches.RxCollectionCache;
import com.azure.cosmos.ConsistencyLevel;
import com.azure.cosmos.implementation.IRetryPolicyFactory;
import com.azure.cosmos.implementation.RxDocumentServiceRequest;
import com.azure.cosmos.implementation.RxDocumentServiceResponse;
import reactor.core.publisher.Mono;

/**
 * While this class is public, but it is not part of our published public APIs.
 * This is meant to be internally used only by our sdk.
 */
public interface IDocumentQueryClient {

    /**
     * TODO: this should be async returning observable
     * @return
     */
    RxCollectionCache getCollectionCache();

    /**
     * TODO: this should be async returning observable
     * @return
     */
    IPartitionKeyRangeCache getPartitionKeyRangeCache();

    /**
     * @return
     */
    IRetryPolicyFactory getResetSessionTokenRetryPolicy();

    /**
     * TODO: this should be async returning observable
     * @return 
     */
    ConsistencyLevel getDefaultConsistencyLevelAsync();

    /**
     * TODO: this should be async returning observable
     * @return 
     */
    ConsistencyLevel getDesiredConsistencyLevelAsync();

    Mono executeQueryAsync(RxDocumentServiceRequest request);

    QueryCompatibilityMode getQueryCompatibilityMode();

    /// 
    /// A client query compatibility mode when making query request.
    /// Can be used to force a specific query request format.
    /// 
    enum QueryCompatibilityMode {
        /// 
        /// DEFAULT (latest) query format.
        /// 
        Default,

        /// 
        /// Query (application/query+json).
        /// DEFAULT.
        /// 
        Query,

        /// 
        /// SqlQuery (application/sql).
        /// 
        SqlQuery
    }

    Mono readFeedAsync(RxDocumentServiceRequest request);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy