Class GatewayAddressCache
- java.lang.Object
-
- com.microsoft.azure.cosmosdb.internal.directconnectivity.GatewayAddressCache
-
- All Implemented Interfaces:
IAddressCache
public class GatewayAddressCache extends Object implements IAddressCache
-
-
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 voiddispose()rx.CompletableopenAsync(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:IAddressCacheResolves physical addresses by either PartitionKeyRangeIdentity.- Specified by:
tryGetAddressesin interfaceIAddressCache- 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 IdforceRefreshPartitionAddresses- 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)
-
-