Class AddressResolver

  • All Implemented Interfaces:
    IAddressResolver

    public class AddressResolver
    extends Object
    implements IAddressResolver
    Abstracts out the logic to resolve physical replica addresses for the given RxDocumentServiceRequest

    AddressCache internally maintains CollectionCache, CollectionRoutingMapCache and BackendAddressCache. Logic in this class mainly joins these 3 caches and deals with potential staleness of the caches.

    • Constructor Detail

      • AddressResolver

        public AddressResolver()
    • Method Detail

      • initializeCaches

        public void initializeCaches​(com.microsoft.azure.cosmosdb.rx.internal.caches.RxCollectionCache collectionCache,
                                     com.microsoft.azure.cosmosdb.rx.internal.ICollectionRoutingMapCache collectionRoutingMapCache,
                                     IAddressCache addressCache)
      • resolveAsync

        public rx.Single<com.microsoft.azure.cosmosdb.internal.directconnectivity.AddressInformation[]> resolveAsync​(com.microsoft.azure.cosmosdb.rx.internal.RxDocumentServiceRequest request,
                                                                                                                     boolean forceRefreshPartitionAddresses)
        Specified by:
        resolveAsync in interface IAddressResolver