Share via


CommunicationClientFactoryBase<TCommunicationClient>.GetClientAsync Methode

Definition

Überlädt

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

Ruft den CommunicationClient für den angegebenen Listenernamen ab oder erstellt ihn, indem basierend auf dem angegebenen previousRsp aufgelöst wird.

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

Löst eine Partition des angegebenen Diensts auf, die einen oder mehrere Kommunikationslistener enthält, und gibt einen Client zurück, der mit dem Endpunkt kommuniziert, der dem angegebenen ListenerName entspricht.

Der Endpunkt des Diensts hat das Format : {"Endpoints":{"Listener1":"Endpoint1","Listener2":"Endpoint2" ...}}

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

Ruft den CommunicationClient für den angegebenen Listenernamen ab oder erstellt ihn, indem basierend auf dem angegebenen previousRsp aufgelöst wird.

public System.Threading.Tasks.Task<TCommunicationClient> GetClientAsync (System.Fabric.ResolvedServicePartition previousRsp, Microsoft.ServiceFabric.Services.Communication.Client.TargetReplicaSelector targetReplica, 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<'CommunicationClient (requires 'CommunicationClient :> Microsoft.ServiceFabric.Services.Communication.Client.ICommunicationClient)>
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<'CommunicationClient (requires 'CommunicationClient :> Microsoft.ServiceFabric.Services.Communication.Client.ICommunicationClient)>
Public Function GetClientAsync (previousRsp As ResolvedServicePartition, targetReplica As TargetReplicaSelector, listenerName As String, retrySettings As OperationRetrySettings, cancellationToken As CancellationToken) As Task(Of TCommunicationClient)

Parameter

previousRsp
ResolvedServicePartition

Vorheriger ResolvedServicePartition-Wert

targetReplica
TargetReplicaSelector

Gibt an, mit welchem Replikat in der Partition, die durch den Partitionsschlüssel identifiziert wird, der Client eine Verbindung herstellen soll.

listenerName
String

Gibt an, welcher Listener im Endpunkt des ausgewählten Replikats, mit dem der Client eine Verbindung herstellen soll

retrySettings
OperationRetrySettings

Gibt die Wiederholungsrichtlinie an, die für Ausnahmen verwendet werden soll, die beim Erstellen des Clients auftreten.

cancellationToken
CancellationToken

Abbruchtoken

Gibt zurück

Task<TCommunicationClient>

Ein Task , der einen ausstehenden Vorgang darstellt. Das Ergebnis der Aufgabe ist das CommunicationClient(ICommunicationClient)-Objekt.

Implementiert

Gilt für:

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

Löst eine Partition des angegebenen Diensts auf, die einen oder mehrere Kommunikationslistener enthält, und gibt einen Client zurück, der mit dem Endpunkt kommuniziert, der dem angegebenen ListenerName entspricht.

Der Endpunkt des Diensts hat das Format : {"Endpoints":{"Listener1":"Endpoint1","Listener2":"Endpoint2" ...}}

public System.Threading.Tasks.Task<TCommunicationClient> 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<'CommunicationClient (requires 'CommunicationClient :> Microsoft.ServiceFabric.Services.Communication.Client.ICommunicationClient)>
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<'CommunicationClient (requires 'CommunicationClient :> Microsoft.ServiceFabric.Services.Communication.Client.ICommunicationClient)>
Public Function GetClientAsync (serviceUri As Uri, partitionKey As ServicePartitionKey, targetReplicaSelector As TargetReplicaSelector, listenerName As String, retrySettings As OperationRetrySettings, cancellationToken As CancellationToken) As Task(Of TCommunicationClient)

Parameter

serviceUri
Uri

URI des aufzulösenden Diensts

partitionKey
ServicePartitionKey

Schlüssel, der die aufzulösde Partition identifiziert

targetReplicaSelector
TargetReplicaSelector

Gibt an, mit welchem Replikat in der Partition, die durch den Partitionsschlüssel identifiziert wird, der Client eine Verbindung herstellen soll.

listenerName
String

Gibt an, welcher Listener im Endpunkt des ausgewählten Replikats, mit dem der Client eine Verbindung herstellen soll

retrySettings
OperationRetrySettings

Gibt die Wiederholungsrichtlinie an, die für Ausnahmen verwendet werden soll, die beim Erstellen des Clients auftreten.

cancellationToken
CancellationToken

Abbruchtoken

Gibt zurück

Task<TCommunicationClient>

Ein Task , der einen ausstehenden Vorgang darstellt. Das Ergebnis der Aufgabe ist das CommunicationClient(ICommunicationClient)-Objekt.

Implementiert

Gilt für: