你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

ServicePartitionClient<TCommunicationClient> Interface

Type Parameters

TCommunicationClient

public interface ServicePartitionClient

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

Method Summary

Modifier and Type Method and Description
CommunicationClientFactory<TCommunicationClient> getCommunicationClientFactory()

Gets the communication client factory

ResolvedServicePartition getLastResolvedServicePartition()

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

String getListenerName()

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

ServicePartitionKey getPartitionKey()

Gets the key of the partition the client is communicating with.

URI getServiceUri()

Gets the name of the service

TargetReplicaSelector getTargetReplicaSelector()

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

Method Details

getCommunicationClientFactory

public CommunicationClientFactory getCommunicationClientFactory()

Gets the communication client factory

Returns:

Communication client factory

getLastResolvedServicePartition

public ResolvedServicePartition getLastResolvedServicePartition()

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

Returns:

true if a ResolvedServicePartition was set

getListenerName

public String getListenerName()

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

Returns:

Listener name

getPartitionKey

public ServicePartitionKey getPartitionKey()

Gets the key of the partition the client is communicating with.

Returns:

Partition key

getServiceUri

public URI getServiceUri()

Gets the name of the service

Returns:

Name of the service

getTargetReplicaSelector

public TargetReplicaSelector getTargetReplicaSelector()

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

Returns:

Applies to