共用方式為


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