Class GatewayAddressCache

    • Constructor Summary

      Constructors 
      Constructor Description
      GatewayAddressCache​(URL serviceEndpoint, com.microsoft.azure.cosmosdb.internal.directconnectivity.Protocol protocol, com.microsoft.azure.cosmosdb.rx.internal.IAuthorizationTokenProvider tokenProvider, com.microsoft.azure.cosmosdb.internal.UserAgentContainer userAgent, io.reactivex.netty.protocol.http.client.CompositeHttpClient<io.netty.buffer.ByteBuf,​io.netty.buffer.ByteBuf> httpClient)  
      GatewayAddressCache​(URL serviceEndpoint, com.microsoft.azure.cosmosdb.internal.directconnectivity.Protocol protocol, com.microsoft.azure.cosmosdb.rx.internal.IAuthorizationTokenProvider tokenProvider, com.microsoft.azure.cosmosdb.internal.UserAgentContainer userAgent, io.reactivex.netty.protocol.http.client.CompositeHttpClient<io.netty.buffer.ByteBuf,​io.netty.buffer.ByteBuf> httpClient, long suboptimalPartitionForceRefreshIntervalInSeconds)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dispose()  
      rx.Completable openAsync​(com.microsoft.azure.cosmosdb.DocumentCollection collection, List<com.microsoft.azure.cosmosdb.internal.routing.PartitionKeyRangeIdentity> partitionKeyRangeIdentities)  
      rx.Single<com.microsoft.azure.cosmosdb.internal.directconnectivity.AddressInformation[]> tryGetAddresses​(com.microsoft.azure.cosmosdb.rx.internal.RxDocumentServiceRequest request, com.microsoft.azure.cosmosdb.internal.routing.PartitionKeyRangeIdentity partitionKeyRangeIdentity, boolean forceRefreshPartitionAddresses)
      Resolves physical addresses by either PartitionKeyRangeIdentity.
    • Constructor Detail

      • GatewayAddressCache

        public GatewayAddressCache​(URL serviceEndpoint,
                                   com.microsoft.azure.cosmosdb.internal.directconnectivity.Protocol protocol,
                                   com.microsoft.azure.cosmosdb.rx.internal.IAuthorizationTokenProvider tokenProvider,
                                   com.microsoft.azure.cosmosdb.internal.UserAgentContainer userAgent,
                                   io.reactivex.netty.protocol.http.client.CompositeHttpClient<io.netty.buffer.ByteBuf,​io.netty.buffer.ByteBuf> httpClient,
                                   long suboptimalPartitionForceRefreshIntervalInSeconds)
      • GatewayAddressCache

        public GatewayAddressCache​(URL serviceEndpoint,
                                   com.microsoft.azure.cosmosdb.internal.directconnectivity.Protocol protocol,
                                   com.microsoft.azure.cosmosdb.rx.internal.IAuthorizationTokenProvider tokenProvider,
                                   com.microsoft.azure.cosmosdb.internal.UserAgentContainer userAgent,
                                   io.reactivex.netty.protocol.http.client.CompositeHttpClient<io.netty.buffer.ByteBuf,​io.netty.buffer.ByteBuf> httpClient)
    • Method Detail

      • tryGetAddresses

        public rx.Single<com.microsoft.azure.cosmosdb.internal.directconnectivity.AddressInformation[]> tryGetAddresses​(com.microsoft.azure.cosmosdb.rx.internal.RxDocumentServiceRequest request,
                                                                                                                        com.microsoft.azure.cosmosdb.internal.routing.PartitionKeyRangeIdentity partitionKeyRangeIdentity,
                                                                                                                        boolean forceRefreshPartitionAddresses)
        Description copied from interface: IAddressCache
        Resolves physical addresses by either PartitionKeyRangeIdentity.
        Specified by:
        tryGetAddresses in interface IAddressCache
        Parameters:
        request - Request is needed only by GatewayAddressCache in the only case when request is name based and user has name based auth token. PartitionkeyRangeIdentity can be used to locate auth token in this case.
        partitionKeyRangeIdentity - target partition key range Id
        forceRefreshPartitionAddresses - Whether addresses need to be refreshed as previously resolved addresses were determined to be outdated.
        Returns:
        Physical addresses.
      • dispose

        public void dispose()
      • openAsync

        public rx.Completable openAsync​(com.microsoft.azure.cosmosdb.DocumentCollection collection,
                                        List<com.microsoft.azure.cosmosdb.internal.routing.PartitionKeyRangeIdentity> partitionKeyRangeIdentities)