ServicePartitionClient<TCommunicationClient> Class

Definition

Specifies an instance of the communication client that can communicate with the replicas of a particular partition.

public class ServicePartitionClient<TCommunicationClient> : Microsoft.ServiceFabric.Services.Communication.Client.IServicePartitionClient<TCommunicationClient> where TCommunicationClient : ICommunicationClient
type ServicePartitionClient<'CommunicationClient (requires 'CommunicationClient :> ICommunicationClient)> = class
    interface IServicePartitionClient<'CommunicationClient (requires 'CommunicationClient :> ICommunicationClient)>
Public Class ServicePartitionClient(Of TCommunicationClient)
Implements IServicePartitionClient(Of TCommunicationClient)

Type Parameters

TCommunicationClient

type of Communication client

Inheritance
ServicePartitionClient<TCommunicationClient>
Implements

Constructors

ServicePartitionClient<TCommunicationClient>(ICommunicationClientFactory<TCommunicationClient>, Uri, ServicePartitionKey, TargetReplicaSelector, String, OperationRetrySettings)

Instantiates a service partition client that uses the specified communication client factory to create a client to talk to the service endpoint identified by the service uri, partitionkey, replica and listener arguments.

Properties

Factory

Gets the communication client factory

ListenerName

Gets the name of the listener in the replica to which the client should connect to.

PartitionKey

Gets the partition key.

ServiceUri

Gets the name of the service

TargetReplicaSelector

Gets the information about which replica in the partition the client should connect to.

Methods

InvokeWithRetry(Action<TCommunicationClient>, Type[])

Invokes the given Function, retrying for exceptions thrown other than the exceptions in the doNotRetryExceptionTypes. For exceptions that are not in doNotRetryExceptionTypes, CommunicationClientFactory's ReportOperationExceptionAsync() method controls if the exception should be retried or not.

InvokeWithRetry<TResult>(Func<TCommunicationClient,TResult>, Type[])

Invokes the given Function, retrying for exceptions thrown other than the exceptions in the doNotRetryExceptionTypes. For exceptions that are not in doNotRetryExceptionTypes, CommunicationClientFactory's ReportOperationExceptionAsync() method controls if the exception should be retried or not.

InvokeWithRetryAsync(Func<TCommunicationClient,Task>, CancellationToken, Type[])

Invokes the given Function, retrying for exceptions thrown other than the exceptions in the doNotRetryExceptionTypes. For exceptions that are not in doNotRetryExceptionTypes, CommunicationClientFactory's ReportOperationExceptionAsync() method controls if the exception should be retried or not.

InvokeWithRetryAsync(Func<TCommunicationClient,Task>, Type[])

Invokes the given Function, retrying for exceptions thrown other than the exceptions in the doNotRetryExceptionTypes. For exceptions that are not in doNotRetryExceptionTypes, CommunicationClientFactory's ReportOperationExceptionAsync() method controls if the exception should be retried or not.

InvokeWithRetryAsync<TResult>(Func<TCommunicationClient,Task<TResult>>, CancellationToken, Type[])

Invokes the given Function, retrying for exceptions thrown other than the exceptions in the doNotRetryExceptionTypes. For exceptions that are not in doNotRetryExceptionTypes, CommunicationClientFactory's ReportOperationExceptionAsync() method controls if the exception should be retried or not.

InvokeWithRetryAsync<TResult>(Func<TCommunicationClient,Task<TResult>>, Type[])

Invokes the given Function, retrying for exceptions thrown other than the exceptions in the doNotRetryExceptionTypes. For exceptions that are not in doNotRetryExceptionTypes, CommunicationClientFactory's ReportOperationExceptionAsync() method controls if the exception should be retried or not.

TryGetLastResolvedServicePartition(ResolvedServicePartition)

Gets the resolved service partition that was set on the client.

Applies to