Class ConsistencyReader


  • public class ConsistencyReader
    extends Object
    ConsistencyReader has a dependency on both StoreReader and QuorumReader. For Bounded Staleness and Strong Consistency, it uses the Quorum Reader to converge on a read from read quorum number of replicas. For Session and Eventual Consistency, it directly uses the store reader.
    • Constructor Detail

      • ConsistencyReader

        public ConsistencyReader​(com.microsoft.azure.cosmosdb.rx.internal.Configs configs,
                                 AddressSelector addressSelector,
                                 com.microsoft.azure.cosmosdb.ISessionContainer sessionContainer,
                                 TransportClient transportClient,
                                 GatewayServiceConfigurationReader serviceConfigReader,
                                 com.microsoft.azure.cosmosdb.rx.internal.IAuthorizationTokenProvider authorizationTokenProvider)
    • Method Detail

      • readAsync

        public rx.Single<com.microsoft.azure.cosmosdb.internal.directconnectivity.StoreResponse> readAsync​(com.microsoft.azure.cosmosdb.rx.internal.RxDocumentServiceRequest entity,
                                                                                                           com.microsoft.azure.cosmosdb.internal.directconnectivity.TimeoutHelper timeout,
                                                                                                           boolean isInRetry,
                                                                                                           boolean forceRefresh)
      • getMaxReplicaSetSize

        public int getMaxReplicaSetSize​(com.microsoft.azure.cosmosdb.rx.internal.RxDocumentServiceRequest entity)
      • getMinReplicaSetSize

        public int getMinReplicaSetSize​(com.microsoft.azure.cosmosdb.rx.internal.RxDocumentServiceRequest entity)