ServicePartitionResolver Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Implements the Service partition resolver class that uses the FabricClient's ResolveServicePartitionAsync(Uri) method for service resolution and implements a back-off/retry mechanism on errors from that method.
public class ServicePartitionResolver : Microsoft.ServiceFabric.Services.Client.IServicePartitionResolver
type ServicePartitionResolver = class
interface IServicePartitionResolver
Public Class ServicePartitionResolver
Implements IServicePartitionResolver
- Inheritance
-
ServicePartitionResolver
- Implements
Constructors
ServicePartitionResolver(CreateFabricClientDelegate, CreateFabricClientDelegate) |
Initializes a new instance of the ServicePartitionResolver class. |
ServicePartitionResolver(CreateFabricClientDelegate) |
Initializes a new instance of the ServicePartitionResolver class. The constructor invokes the given delegate to create an instance of FabricClient that is used for connecting to a Service Fabric cluster and perform service resolution. |
ServicePartitionResolver(FabricClientSettings, String[]) |
Initializes a new instance of the ServicePartitionResolver class. The constructor uses given settings and connectionEndpoints to create an instance of FabricClient that is used for connecting to a Service Fabric cluster and perform service resolution. |
ServicePartitionResolver(SecurityCredentials, FabricClientSettings, String[]) |
Initializes a new instance of the ServicePartitionResolver class. The constructor uses the given security credentials, settings and the connectionEndpoints to create an instance of FabricClient that is used for connecting to a Service Fabric cluster and perform service resolution. |
ServicePartitionResolver(SecurityCredentials, String[]) |
Initializes a new instance of the ServicePartitionResolver class. The constructor uses the given security credentials and the connectionEndpoints to create an instance of FabricClient that is used for connecting to a Service Fabric cluster and perform service resolution. |
ServicePartitionResolver(String[]) |
Initializes a new instance of the ServicePartitionResolver class. The constructor uses given connectionEndpoints to create an instance of FabricClient that is used for connecting to a Service Fabric cluster and perform service resolution. |
Fields
DefaultMaxRetryBackoffInterval |
The default maximum back-off time used by ServicePartitionResolver's ResolveAsync method before retrying, when it is invoked without explicitly specifying the maxRetryBackoffInterval argument. The default value is 5 seconds. |
DefaultResolveTimeout |
The default resolve timeout per try used by the ResolveAsync method of ServicePartitionResolver when it is invoked without explicitly specifying the resolveTimeoutPerTry argument. The default value is 30 seconds. |
Methods
GetDefault() |
Gets the default ServicePartitionResolver. The default service partition resolver instance uses the local fabric client. If you are using the ServicePartitionResolver to resolve services that are running on a remote cluster, the recommended practice is to create a ServicePartitionResolver using the appropriate endpoints or FabricClient and then update the default ServicePartitionResolver. |
ResolveAsync(ResolvedServicePartition, CancellationToken) |
Resolves a partition of the specified service by invoking FabricClient's ResolveServicePartitionAsync(Uri)method with back-off/retry on retry-able errors. This takes in the resolved service partition that was got via an earlier invocation of the ResolveAsync() method. This method overload is used in cases where the client knows that the resolved service partition that it has is no longer valid. |
ResolveAsync(ResolvedServicePartition, TimeSpan, TimeSpan, CancellationToken) |
Resolves a partition of the specified service by invoking FabricClient's ResolveServicePartitionAsync(Uri)method with back-off/retry on retry-able errors. This takes in the resolved service partition that was got via an earlier invocation of the ResolveAsync() method. This method overload is used in cases where the client knows that the resolved service partition that it has is no longer valid. |
ResolveAsync(Uri, ServicePartitionKey, CancellationToken) |
Resolves a partition of the specified service by invoking FabricClient's ResolveServicePartitionAsync(Uri)method. This uses the default settings for timeout and back-off retry intervals. |
ResolveAsync(Uri, ServicePartitionKey, TimeSpan, TimeSpan, CancellationToken) |
Resolves a partition of the specified service by invoking FabricClient's ResolveServicePartitionAsync(Uri) method with the given timeout and back-off/retry on retry-able errors. |
SetDefault(ServicePartitionResolver) |
Updates the default ServicePartitionResolver. |
Extension Methods
DisableNotification(ServicePartitionResolver) |
An extension method that disables the notification for this particular instance of ServicePartitionResolver By default, service partition Resolver register for notification.There is a cache of service endpoints in the client that gets updated by notifications and this same cache is used to satisfy complaint based resolution requests. If you interested in only complain based resolution, then you could use this extension to disable it. |
Applies to
Azure SDK for .NET