FabricTransportServiceRemotingClientFactory.GetClientAsync Method

Definition

Overloads

GetClientAsync(ResolvedServicePartition, TargetReplicaSelector, String, OperationRetrySettings, CancellationToken)

Re-resolves a partition of the specified service containing one or more communication listeners and returns a client to communicate to the endpoint corresponding to the given listenerName. The endpoint of the service is of the form - {"Endpoints":{"Listener1":"Endpoint1","Listener2":"Endpoint2" ...}}

GetClientAsync(Uri, ServicePartitionKey, TargetReplicaSelector, String, OperationRetrySettings, CancellationToken)

Resolves a partition of the specified service containing one or more communication listeners and returns a client to communicate to the endpoint corresponding to the given listenerName. The endpoint of the service is of the form - {"Endpoints":{"Listener1":"Endpoint1","Listener2":"Endpoint2" ...}}

GetClientAsync(ResolvedServicePartition, TargetReplicaSelector, String, OperationRetrySettings, CancellationToken)

Re-resolves a partition of the specified service containing one or more communication listeners and returns a client to communicate to the endpoint corresponding to the given listenerName. The endpoint of the service is of the form - {"Endpoints":{"Listener1":"Endpoint1","Listener2":"Endpoint2" ...}}

public System.Threading.Tasks.Task<Microsoft.ServiceFabric.Services.Remoting.V2.Client.IServiceRemotingClient> GetClientAsync (System.Fabric.ResolvedServicePartition previousRsp, Microsoft.ServiceFabric.Services.Communication.Client.TargetReplicaSelector targetReplicaSelector, string listenerName, Microsoft.ServiceFabric.Services.Communication.Client.OperationRetrySettings retrySettings, System.Threading.CancellationToken cancellationToken);
abstract member GetClientAsync : System.Fabric.ResolvedServicePartition * Microsoft.ServiceFabric.Services.Communication.Client.TargetReplicaSelector * string * Microsoft.ServiceFabric.Services.Communication.Client.OperationRetrySettings * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.ServiceFabric.Services.Remoting.V2.Client.IServiceRemotingClient>
override this.GetClientAsync : System.Fabric.ResolvedServicePartition * Microsoft.ServiceFabric.Services.Communication.Client.TargetReplicaSelector * string * Microsoft.ServiceFabric.Services.Communication.Client.OperationRetrySettings * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.ServiceFabric.Services.Remoting.V2.Client.IServiceRemotingClient>
Public Function GetClientAsync (previousRsp As ResolvedServicePartition, targetReplicaSelector As TargetReplicaSelector, listenerName As String, retrySettings As OperationRetrySettings, cancellationToken As CancellationToken) As Task(Of IServiceRemotingClient)

Parameters

previousRsp
ResolvedServicePartition

Previous ResolvedServicePartition value

targetReplicaSelector
TargetReplicaSelector

Specifies which replica in the partition identified by the partition key, the client should connect to

listenerName
String

Specifies which listener in the endpoint of the chosen replica, to which the client should connect to

retrySettings
OperationRetrySettings

Specifies the retry policy that should be used for exceptions that occur when creating the client.

cancellationToken
CancellationToken

Cancellation token

Returns

A Task that represents outstanding operation. The result of the Task is the CommunicationClient(ICommunicationClient) object.

Implements

Applies to

GetClientAsync(Uri, ServicePartitionKey, TargetReplicaSelector, String, OperationRetrySettings, CancellationToken)

Resolves a partition of the specified service containing one or more communication listeners and returns a client to communicate to the endpoint corresponding to the given listenerName. The endpoint of the service is of the form - {"Endpoints":{"Listener1":"Endpoint1","Listener2":"Endpoint2" ...}}

public System.Threading.Tasks.Task<Microsoft.ServiceFabric.Services.Remoting.V2.Client.IServiceRemotingClient> GetClientAsync (Uri serviceUri, Microsoft.ServiceFabric.Services.Client.ServicePartitionKey partitionKey, Microsoft.ServiceFabric.Services.Communication.Client.TargetReplicaSelector targetReplicaSelector, string listenerName, Microsoft.ServiceFabric.Services.Communication.Client.OperationRetrySettings retrySettings, System.Threading.CancellationToken cancellationToken);
abstract member GetClientAsync : Uri * Microsoft.ServiceFabric.Services.Client.ServicePartitionKey * Microsoft.ServiceFabric.Services.Communication.Client.TargetReplicaSelector * string * Microsoft.ServiceFabric.Services.Communication.Client.OperationRetrySettings * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.ServiceFabric.Services.Remoting.V2.Client.IServiceRemotingClient>
override this.GetClientAsync : Uri * Microsoft.ServiceFabric.Services.Client.ServicePartitionKey * Microsoft.ServiceFabric.Services.Communication.Client.TargetReplicaSelector * string * Microsoft.ServiceFabric.Services.Communication.Client.OperationRetrySettings * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.ServiceFabric.Services.Remoting.V2.Client.IServiceRemotingClient>
Public Function GetClientAsync (serviceUri As Uri, partitionKey As ServicePartitionKey, targetReplicaSelector As TargetReplicaSelector, listenerName As String, retrySettings As OperationRetrySettings, cancellationToken As CancellationToken) As Task(Of IServiceRemotingClient)

Parameters

serviceUri
Uri

Uri of the service to resolve

partitionKey
ServicePartitionKey

Key that identifies the partition to resolve

targetReplicaSelector
TargetReplicaSelector

Specifies which replica in the partition identified by the partition key, the client should connect to

listenerName
String

Specifies which listener in the endpoint of the chosen replica, to which the client should connect to

retrySettings
OperationRetrySettings

Specifies the retry policy that should be used for exceptions that occur when creating the client.

cancellationToken
CancellationToken

Cancellation token

Returns

A Task that represents outstanding operation. The result of the Task is the CommunicationClient(ICommunicationClient) object.

Implements

Applies to